coder / coder/internal

ci: lint/go bodyclose in azureidentity_internal_test.go

Open
#1,534 0 comments 0 reactions 1 assignee Claimed by @jdomeracki-coder View on GitHub
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

CI Run Link: https://github.com/coder/coder/actions/runs/25791859937
Failed Job: https://github.com/coder/coder/actions/runs/25791859937/job/75759237891 (lint)

Commit Info:
- SHA: fb3aef1883eeb2bca266a267f474e8ddb062b406
- Author: Jakub Domeracki
- https://github.com/coder/coder/commit/fb3aef1883eeb2bca266a267f474e8ddb062b406

Error Evidence:
```
##[error]coderd/azureidentity/azureidentity_internal_test.go:67:31: response body must be closed (bodyclose)
_, err := certFetchClient.Get(srv.URL)
^
```

Root Cause:
`TestCertFetchClientRejectsLoopback` calls `certFetchClient.Get(srv.URL)` without closing the response body, tripping the `bodyclose` linter in `make lint`.

Precise Assignment Analysis:
- git blame is not available via the API; used file history instead.
- `git log --oneline -10 --follow coderd/azureidentity/azureidentity_internal_test.go` -> fb3aef188 (Jakub Domeracki) most recent change.
Assigning to `jdomeracki-coder` as the author of the latest changes to this test.

Classification:
E. Code Change (lint violation).

Related Issues Searched:
- "response body must be closed" + bodyclose
- "azureidentity_internal_test.go"
- "azureidentity" + lint

Reproduction:
- `make lint` (or `golangci-lint run` with bodyclose enabled)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.