mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
fix: e2e caddy test after changing the config header
This commit is contained in:
1 parent
2345ee9856
commit
aa71ab0220
1 file changed
+5
-1
@@ -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