From aa71ab022030a561bcbc7d450a321d76461d7ff6 Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Mon, 22 Dec 2025 21:22:56 +1000 Subject: [PATCH] fix: e2e caddy test after changing the config header --- test/e2e/service_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/e2e/service_test.go b/test/e2e/service_test.go index 341e553f..e273ed24 100644 --- a/test/e2e/service_test.go +++ b/test/e2e/service_test.go @@ -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") })