mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
fix: e2e caddy test after changing the config header
This commit is contained in:
@@ -480,7 +480,11 @@ myapp.example.com {
|
||||
// Check that the Caddy config hasn't changed.
|
||||
newConfig, err := cli.Caddy.GetConfig(ctx, nil)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, validConfig, newConfig.Caddyfile,
|
||||
|
||||
// Compare stable parts of the Caddyfile only (skip autogenerated comment with timestamp).
|
||||
_, stableValidConfig, _ := strings.Cut(validConfig, "\n")
|
||||
_, stableNewConfig, _ := strings.Cut(newConfig.Caddyfile, "\n")
|
||||
assert.Equal(t, stableValidConfig, stableNewConfig,
|
||||
"Caddy config should not change when an invalid user-defined Caddy config is deployed")
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user