diff options
Diffstat (limited to 'plugins/websockets/origin_test.go')
-rw-r--r-- | plugins/websockets/origin_test.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/websockets/origin_test.go b/plugins/websockets/origin_test.go index e877fad3..ec6e1960 100644 --- a/plugins/websockets/origin_test.go +++ b/plugins/websockets/origin_test.go @@ -11,7 +11,8 @@ func TestConfig_Origin(t *testing.T) { AllowedOrigin: "*", } - cfg.InitDefault() + err := cfg.InitDefault() + assert.NoError(t, err) assert.True(t, isOriginAllowed("http://some.some.some.sssome", cfg)) assert.True(t, isOriginAllowed("http://", cfg)) @@ -29,7 +30,8 @@ func TestConfig_OriginWildCard(t *testing.T) { AllowedOrigin: "https://*my.site.com", } - cfg.InitDefault() + err := cfg.InitDefault() + assert.NoError(t, err) assert.True(t, isOriginAllowed("https://my.site.com", cfg)) assert.False(t, isOriginAllowed("http://", cfg)) @@ -50,7 +52,8 @@ func TestConfig_OriginWildCard2(t *testing.T) { AllowedOrigin: "https://my.*.com", } - cfg.InitDefault() + err := cfg.InitDefault() + assert.NoError(t, err) assert.True(t, isOriginAllowed("https://my.site.com", cfg)) assert.False(t, isOriginAllowed("http://", cfg)) |