close test http server after tests

fix-partial-response
WeidiDeng 2026-06-30 10:24:43 +08:00
parent f7b4830ffe
commit 6a18beecc7
No known key found for this signature in database
GPG Key ID: 25F87CE1741EC7CD
1 changed files with 3 additions and 0 deletions

View File

@ -924,6 +924,9 @@ func TestReverseProxyResponseHandling(t *testing.T) {
})
ts := httptest.NewUnstartedServer(mux)
ts.Start()
t.Cleanup(func() {
ts.Close()
})
tester := caddytest.NewTester(t)
tester.InitServer(fmt.Sprintf(`