Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Pivotto <[email protected]>
  • Loading branch information
roidelapluie committed Nov 29, 2022
1 parent 2528877 commit 0af5c3f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions web/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func TestBasicAuthWithFakepassword(t *testing.T) {
// TestByPassBasicAuthVuln tests for CVE-2022-46146.
func TestByPassBasicAuthVuln(t *testing.T) {
server := &http.Server{
Addr: port,
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello World!"))
}),
Expand All @@ -146,12 +147,7 @@ func TestByPassBasicAuthVuln(t *testing.T) {
})

go func() {
flags := FlagConfig{
WebListenAddresses: &([]string{port}),
WebSystemdSocket: OfBool(false),
WebConfigFile: OfString("testdata/web_config_users_noTLS.good.yml"),
}
ListenAndServe(server, &flags, testlogger)
ListenAndServe(server, "testdata/web_config_users_noTLS.good.yml", testlogger)
close(done)
}()

Expand Down

0 comments on commit 0af5c3f

Please sign in to comment.