diff --git a/adapter/internal/oasparser/envoyconf/envoyconf_internal_test.go b/adapter/internal/oasparser/envoyconf/envoyconf_internal_test.go index a22fa8aeec..67f82a12fc 100644 --- a/adapter/internal/oasparser/envoyconf/envoyconf_internal_test.go +++ b/adapter/internal/oasparser/envoyconf/envoyconf_internal_test.go @@ -719,7 +719,7 @@ func TestGetCorsPolicy(t *testing.T) { // Test the configuration when headers configuration is not provided. corsPolicy3 := getCorsPolicy(corsConfigModel3) assert.NotNil(t, corsPolicy3, "Cors Policy should not be null.") - assert.Empty(t, corsPolicy3.GetAllowHeaders(), "Cors Allow headers should be null.") + assert.Equal(t, "x-choreo-test-session-id", corsPolicy3.GetAllowHeaders(), "Cors Allow headers mismatch") assert.Empty(t, corsPolicy3.GetExposeHeaders(), "Cors Expose Headers should be null.") assert.NotEmpty(t, corsPolicy3.GetAllowOriginStringMatch(), "Cors Allowded Origins should not be null.") assert.Equal(t, regexp.QuoteMeta("http://test1.com"), @@ -737,7 +737,7 @@ func TestGetCorsPolicy(t *testing.T) { err := routeWithoutCors.GetTypedPerFilterConfig()[wellknown.CORS].UnmarshalTo(corsConfig1) assert.Nilf(t, err, "Error while parsing Cors Configuration %v", corsConfig1) - assert.Empty(t, corsConfig1.GetAllowHeaders(), "Cors AllowHeaders should be empty.") + assert.Equal(t, "x-choreo-test-session-id", corsConfig1.GetAllowHeaders(), "Cors Allow headers mismatch") assert.Empty(t, corsConfig1.GetAllowCredentials(), "Cors AllowCredentials should be empty.") assert.Empty(t, corsConfig1.GetAllowMethods(), "Cors AllowMethods should be empty.") assert.Empty(t, corsConfig1.GetAllowOriginStringMatch(), "Cors AllowOriginStringMatch should be empty.")