Skip to content

Commit

Permalink
internal-endpoint-testing: handle x-choreo-test-session-id header cor…
Browse files Browse the repository at this point in the history
…s config

Signed-off-by: Lahiru De Silva <[email protected]>
  • Loading branch information
NomadXD committed Jan 23, 2024
1 parent 930e647 commit 107edec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ func TestGetCorsPolicy(t *testing.T) {
assert.NotNil(t, corsPolicy2.GetAllowMethods())
assert.Equal(t, "GET, POST", corsPolicy2.GetAllowMethods(), "Cors allow methods mismatch.")
assert.NotNil(t, corsPolicy2.GetAllowHeaders(), "Cors Allowed headers should not be null.")
assert.Equal(t, "X-TEST-HEADER1, X-TEST-HEADER2", corsPolicy2.GetAllowHeaders(), "Cors Allow headers mismatch")
assert.Equal(t, "X-TEST-HEADER1, X-TEST-HEADER2, x-choreo-test-session-id", corsPolicy2.GetAllowHeaders(), "Cors Allow headers mismatch")
assert.NotNil(t, corsPolicy2.GetExposeHeaders(), "Cors Expose headers should not be null.")
assert.Equal(t, "X-Custom-Header", corsPolicy2.GetExposeHeaders(), "Cors Expose headers mismatch")
assert.True(t, corsPolicy2.GetAllowCredentials().GetValue(), "Cors Access Allow Credentials should be true")
Expand Down

0 comments on commit 107edec

Please sign in to comment.