mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-15 10:04:44 +00:00
Fix TestWebhook tests
PR #266 appears to have changed the default response code to StatusOK. waitForServerReady() was expected a StatusNotFound response, which was preventing all TestWebhook tests from running.
This commit is contained in:
parent
002c332b68
commit
6c77ff0a2c
1 changed files with 1 additions and 2 deletions
|
@ -76,7 +76,6 @@ func TestWebhook(t *testing.T) {
|
|||
|
||||
for _, tt := range hookHandlerTests {
|
||||
t.Run(tt.desc, func(t *testing.T) {
|
||||
|
||||
ip, port := serverAddress(t)
|
||||
args := []string{fmt.Sprintf("-hooks=%s", configPath), fmt.Sprintf("-ip=%s", ip), fmt.Sprintf("-port=%s", port), "-verbose"}
|
||||
|
||||
|
@ -249,7 +248,7 @@ func serverAddress(t *testing.T) (string, string) {
|
|||
func waitForServerReady(t *testing.T, ip, port string) {
|
||||
waitForServer(t,
|
||||
fmt.Sprintf("http://%v:%v/", ip, port),
|
||||
http.StatusNotFound,
|
||||
http.StatusOK,
|
||||
5*time.Second)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue