Skip to content

Commit

Permalink
fix noctx linter
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
  • Loading branch information
inteon committed May 7, 2024
1 parent 52320fb commit de54201
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ issues:
- exhaustive
- nilerr
- interfacebloat
- noctx
- nilnil
- nakedret
- musttag
Expand Down
4 changes: 3 additions & 1 deletion pkg/healthz/healthz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ func TestHealthzLivezLeaderElection(t *testing.T) {
lastResponseBody string
)
assert.Eventually(t, func() bool {
resp, err := http.Get(livezURL)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, livezURL, nil)
require.NoError(t, err)
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
defer func() {
require.NoError(t, resp.Body.Close())
Expand Down
6 changes: 5 additions & 1 deletion test/integration/certificates/metrics_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ func TestMetricsController(t *testing.T) {
}

testMetrics := func(expectedOutput string) error {
resp, err := http.DefaultClient.Get(metricsEndpoint)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, metricsEndpoint, nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
Expand Down

0 comments on commit de54201

Please sign in to comment.