From 1ec612bd9167cf50614dc90861215e45abdb8750 Mon Sep 17 00:00:00 2001 From: Richard87 Date: Tue, 9 Apr 2024 15:21:14 +0200 Subject: [PATCH] fix test bug --- .github/workflows/pr.yml | 2 +- auth_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 27c077c..99b45a6 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -37,7 +37,7 @@ jobs: name: Lint Helm runs-on: ubuntu-latest steps: - - uses: azure/setup-helm@https://github.com/Azure/setup-helm/commit/b7246b12e77f7134dc2d460a3d5bad15bbe29390 # v4.1.0 + - uses: azure/setup-helm@b7246b12e77f7134dc2d460a3d5bad15bbe29390 # v4.1.0 - name: Helm Lint run: helm lint charts/radix-oauth-guard diff --git a/auth_test.go b/auth_test.go index 699ea9f..b04b258 100644 --- a/auth_test.go +++ b/auth_test.go @@ -44,7 +44,7 @@ func TestMissingAuthHeaderFails(t *testing.T) { req, _ := http.NewRequest("GET", "/auth", nil) handler.ServeHTTP(writer, req) - assert.Equal(t, http.StatusForbidden, writer.Code) + assert.Equal(t, http.StatusUnauthorized, writer.Code) } func TestAuthFailureFails(t *testing.T) { @@ -57,7 +57,7 @@ func TestAuthFailureFails(t *testing.T) { req.Header.Set("Authorization", "Bearer abcdabcd") handler.ServeHTTP(writer, req) - assert.Equal(t, http.StatusForbidden, writer.Code) + assert.Equal(t, http.StatusUnauthorized, writer.Code) } func TestInvalidJWTFails(t *testing.T) {