Skip to content

Commit

Permalink
test: fix assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Aug 14, 2023
1 parent 0470a92 commit 6d8ddcf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions driver/config/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ func TestCORSOptions(t *testing.T) {

conf, enabled := p.CORS(ctx, PublicInterface)
assert.True(t, enabled)
assert.NotNil(t, conf.AllowOriginRequestFunc)
conf.AllowOriginRequestFunc = nil

assert.EqualValues(t, cors.Options{
AllowedOrigins: []string{},
Expand Down Expand Up @@ -263,14 +261,10 @@ func TestViperProviderValidates(t *testing.T) {

gc, enabled := c.CORS(ctx, AdminInterface)
assert.False(t, enabled)
assert.NotNil(t, gc.AllowOriginRequestFunc)
gc.AllowOriginRequestFunc = nil
assert.Equal(t, expectedCors, gc)

gc, enabled = c.CORS(ctx, PublicInterface)
assert.False(t, enabled)
assert.NotNil(t, gc.AllowOriginRequestFunc)
gc.AllowOriginRequestFunc = nil
assert.Equal(t, expectedCors, gc)

assert.Equal(t, []string{"127.0.0.1/32"}, c.TLS(ctx, PublicInterface).AllowTerminationFrom())
Expand Down

0 comments on commit 6d8ddcf

Please sign in to comment.