diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2022-08-29 12:31:53 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2022-08-29 12:31:56 -0600 |
commit | 8cb3cf540c2d083721a1717b9ddf2657b7eb5102 (patch) | |
tree | d196a055c3301b3aef1960d980cda0d1888dd825 /caddytest/integration | |
parent | e1801fdb19988a319fdc174ad39391e1a1c12f54 (diff) |
Minor cleanup, resolve a couple lint warnings
Diffstat (limited to 'caddytest/integration')
-rw-r--r-- | caddytest/integration/stream_test.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/caddytest/integration/stream_test.go b/caddytest/integration/stream_test.go index d5edb79..cfd9d36 100644 --- a/caddytest/integration/stream_test.go +++ b/caddytest/integration/stream_test.go @@ -123,8 +123,8 @@ func TestH2ToH2CStream(t *testing.T) { // Disable any compression method from server. req.Header.Set("Accept-Encoding", "identity") - resp := tester.AssertResponseCode(req, 200) - if 200 != resp.StatusCode { + resp := tester.AssertResponseCode(req, http.StatusOK) + if resp.StatusCode != http.StatusOK { return } go func() { @@ -143,7 +143,6 @@ func TestH2ToH2CStream(t *testing.T) { if !strings.Contains(body, expectedBody) { t.Errorf("requesting \"%s\" expected response body \"%s\" but got \"%s\"", req.RequestURI, expectedBody, body) } - return } func testH2ToH2CStreamServeH2C(t *testing.T) *http.Server { @@ -335,8 +334,8 @@ func TestH2ToH1ChunkedResponse(t *testing.T) { fmt.Fprint(w, expectedBody) w.Close() }() - resp := tester.AssertResponseCode(req, 200) - if 200 != resp.StatusCode { + resp := tester.AssertResponseCode(req, http.StatusOK) + if resp.StatusCode != http.StatusOK { return } @@ -351,7 +350,6 @@ func TestH2ToH1ChunkedResponse(t *testing.T) { if body != expectedBody { t.Errorf("requesting \"%s\" expected response body \"%s\" but got \"%s\"", req.RequestURI, expectedBody, body) } - return } func testH2ToH1ChunkedResponseServeH1(t *testing.T) *http.Server { |