diff options
Diffstat (limited to 'internal/request/request_test.go')
-rw-r--r-- | internal/request/request_test.go | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/internal/request/request_test.go b/internal/request/request_test.go index 3c0f970c..86601554 100644 --- a/internal/request/request_test.go +++ b/internal/request/request_test.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitlab-pages/internal/domain" - "gitlab.com/gitlab-org/gitlab-pages/internal/testhelpers" ) func TestWithHTTPSFlag(t *testing.T) { @@ -30,10 +29,9 @@ func TestIsHTTPS(t *testing.T) { hook := test.NewGlobal() tests := []struct { - name string - flag bool - scheme string - wantLogEntries string + name string + flag bool + scheme string }{ { name: "https", @@ -45,18 +43,6 @@ func TestIsHTTPS(t *testing.T) { flag: false, scheme: "http", }, - { - name: "scheme true but flag is false", - flag: false, - scheme: "https", - wantLogEntries: "request: r.URL.Scheme does not match value in ctxHTTPSKey", - }, - { - name: "scheme false but flag is true", - flag: true, - scheme: "http", - wantLogEntries: "request: r.URL.Scheme does not match value in ctxHTTPSKey", - }, } for _, tt := range tests { @@ -71,8 +57,6 @@ func TestIsHTTPS(t *testing.T) { got := IsHTTPS(httpsRequest) require.Equal(t, tt.flag, got) - - testhelpers.AssertLogContains(t, tt.wantLogEntries, hook.AllEntries()) }) } @@ -83,10 +67,6 @@ func TestPanics(t *testing.T) { require.NoError(t, err) require.Panics(t, func() { - IsHTTPS(r) - }) - - require.Panics(t, func() { GetHost(r) }) |