Skip to content

Commit 5aab180

Browse files
author
Julien Pivotto
authored
Merge pull request #122 from roidelapluie/fix-release-0.7
Fix release 0.7 tests
2 parents 2528877 + 0af5c3f commit 5aab180

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

web/handler_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func TestBasicAuthWithFakepassword(t *testing.T) {
132132
// TestByPassBasicAuthVuln tests for CVE-2022-46146.
133133
func TestByPassBasicAuthVuln(t *testing.T) {
134134
server := &http.Server{
135+
Addr: port,
135136
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
136137
w.Write([]byte("Hello World!"))
137138
}),
@@ -146,12 +147,7 @@ func TestByPassBasicAuthVuln(t *testing.T) {
146147
})
147148

148149
go func() {
149-
flags := FlagConfig{
150-
WebListenAddresses: &([]string{port}),
151-
WebSystemdSocket: OfBool(false),
152-
WebConfigFile: OfString("testdata/web_config_users_noTLS.good.yml"),
153-
}
154-
ListenAndServe(server, &flags, testlogger)
150+
ListenAndServe(server, "testdata/web_config_users_noTLS.good.yml", testlogger)
155151
close(done)
156152
}()
157153

0 commit comments

Comments
 (0)