We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a29d36 commit d6578d5Copy full SHA for d6578d5
1 file changed
integration/main_test.go
@@ -35,6 +35,19 @@ func TestIntegration(t *testing.T) {
35
}()
36
t.Cleanup(func() { _ = server.Close() })
37
38
+ // Health check to ensure the server is up before starting tests.
39
+ require.Eventually(t, func() bool {
40
+ resp, err := http.Get("http://localhost:1234/uuid")
41
+ if err != nil {
42
+ t.Logf("httpbin server not ready yet: %v", err)
43
+ return false
44
+ }
45
+ defer func() {
46
+ _ = resp.Body.Close()
47
+ }()
48
+ return resp.StatusCode == 200
49
+ }, 10*time.Second, 500*time.Millisecond)
50
+
51
// Create a directory for the access logs to be written to.
52
accessLogsDir := cwd + "/access_logs"
53
require.NoError(t, os.RemoveAll(accessLogsDir))
0 commit comments