mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-24 00:44:09 +01:00
Fix basic security tests
This commit is contained in:
parent
be9087bee3
commit
54779e1db8
@ -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",
|
||||
}})
|
||||
|
Loading…
Reference in New Issue
Block a user