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") })