From a55d261eda13b63688f031f568e6d66755132ad9 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Thu, 2 Jun 2022 14:44:34 -0700 Subject: [PATCH] test: manually set contentlength in tests --- command/agent/acl_endpoint_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command/agent/acl_endpoint_test.go b/command/agent/acl_endpoint_test.go index 515c80c1c8d7..0e52a08993cf 100644 --- a/command/agent/acl_endpoint_test.go +++ b/command/agent/acl_endpoint_test.go @@ -240,6 +240,11 @@ func TestHTTP_ACLTokenBootstrapOperator(t *testing.T) { if err != nil { t.Fatalf("err: %v", err) } + + // Since we're not actually writing this HTTP request, we have + // to manually set ContentLength + req.ContentLength = -1 + respW := httptest.NewRecorder() // Make the request obj, err := s.Server.ACLTokenBootstrap(respW, req)