Skip to content

Commit

Permalink
Clean up resources in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris S. Kim committed Sep 14, 2023
1 parent 658c27a commit a1aa591
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,10 @@ func TestAgent_HTTPMaxHeaderBytes(t *testing.T) {
require.NoError(t, err)

a, err := New(bd)
require.NoError(t, err)
mockDelegate := delegateMock{}
mockDelegate.On("LicenseCheck").Return()
a.delegate = &mockDelegate
require.NoError(t, err)

a.startLicenseManager(testutil.TestContext(t))

Expand Down Expand Up @@ -392,6 +392,8 @@ func TestAgent_HTTPMaxHeaderBytes(t *testing.T) {
resp, err := client.Do(req.WithContext(ctx))
require.NoError(t, err)
require.Equal(t, tt.expectedHTTPResponse, resp.StatusCode, "expected a '%d' http response, got '%d'", tt.expectedHTTPResponse, resp.StatusCode)
resp.Body.Close()
s.Shutdown(ctx)
}
})
}
Expand Down

0 comments on commit a1aa591

Please sign in to comment.