From 54779e1db85bc85aad0fdd42224dd3126be977d6 Mon Sep 17 00:00:00 2001 From: TwiN Date: Fri, 31 Dec 2021 00:20:54 -0500 Subject: [PATCH] Fix basic security tests --- security/handler_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/security/handler_test.go b/security/handler_test.go index 2a131cc1..28ac8e17 100644 --- a/security/handler_test.go +++ b/security/handler_test.go @@ -11,7 +11,7 @@ func mockHandler(writer http.ResponseWriter, _ *http.Request) { } func TestHandlerWhenNotAuthenticated(t *testing.T) { - handler := Handler(mockHandler, &Config{&BasicConfig{ + handler := Handler(mockHandler, &Config{Basic: &BasicConfig{ Username: "john.doe", PasswordSha512Hash: "6b97ed68d14eb3f1aa959ce5d49c7dc612e1eb1dafd73b1e705847483fd6a6c809f2ceb4e8df6ff9984c6298ff0285cace6614bf8daa9f0070101b6c89899e22", }}) @@ -26,7 +26,7 @@ func TestHandlerWhenNotAuthenticated(t *testing.T) { } func TestHandlerWhenAuthenticated(t *testing.T) { - handler := Handler(mockHandler, &Config{&BasicConfig{ + handler := Handler(mockHandler, &Config{Basic: &BasicConfig{ Username: "john.doe", PasswordSha512Hash: "6b97ed68d14eb3f1aa959ce5d49c7dc612e1eb1dafd73b1e705847483fd6a6c809f2ceb4e8df6ff9984c6298ff0285cace6614bf8daa9f0070101b6c89899e22", }}) @@ -42,7 +42,7 @@ func TestHandlerWhenAuthenticated(t *testing.T) { } func TestHandlerWhenAuthenticatedWithBadCredentials(t *testing.T) { - handler := Handler(mockHandler, &Config{&BasicConfig{ + handler := Handler(mockHandler, &Config{Basic: &BasicConfig{ Username: "john.doe", PasswordSha512Hash: "6b97ed68d14eb3f1aa959ce5d49c7dc612e1eb1dafd73b1e705847483fd6a6c809f2ceb4e8df6ff9984c6298ff0285cace6614bf8daa9f0070101b6c89899e22", }})