Skip to content

Commit 5154c22

Browse files
authored
fix: small fixup to new /ip test case (#214)
Realized that the test added in #213 had a couple of small-ish issues: - Missing `t.Parallel()` call, unnecessarily slowing down overall test suite - No need to spin up new ephemeral test server, prefer the existing shared one
1 parent 3110dab commit 5154c22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

httpbin/handlers_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,7 @@ func TestIP(t *testing.T) {
412412
// connections but not for direct ServeHTTP calls as the used in the
413413
// httptest.NewRecorder tests above, so we need to use a real server
414414
// to verify handling of both cases.
415-
srv := httptest.NewServer(app)
416-
defer srv.Close()
415+
t.Parallel()
417416

418417
resp, err := client.Get(srv.URL + "/ip")
419418
assert.NilError(t, err)

0 commit comments

Comments
 (0)