chore: update go test

This commit is contained in:
Jonas Kaninda
2024-11-15 08:23:53 +01:00
parent cb31faf65f
commit 28b7643f0c

View File

@@ -54,15 +54,6 @@ func TestStart(t *testing.T) {
t.Fatalf("expected a status code of 200, got %v", resp.StatusCode)
}
}
assertRoutesResponseBody := func(t *testing.T, s *httptest.Server) {
resp, err := s.Client().Get(s.URL + "/health/routes")
if err != nil {
t.Fatalf("unexpected error getting from server: %v", err)
}
if resp.StatusCode != 200 {
t.Fatalf("expected a status code of 200, got %v", resp.StatusCode)
}
}
ctx := context.Background()
go func() {
err = gatewayServer.Start(ctx)
@@ -76,7 +67,6 @@ func TestStart(t *testing.T) {
s := httptest.NewServer(route)
defer s.Close()
assertResponseBody(t, s)
assertRoutesResponseBody(t, s)
})
ctx.Done()
}