Skip to content

chore(tests): apply gopls modernize hints in tests - #175

Merged
lexfrei merged 1 commit into
masterfrom
chore/test-modernize
Oct 8, 2026
Merged

lexfrei merged 1 commit into
masterfrom
chore/test-modernize

Conversation

@lexfrei

@lexfrei lexfrei commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Applies the open gopls modernize hints in the server and Kubernetes discovery tests. Tests that only canceled their run context through defer cancel() now use t.Context(), and struct literals no longer spell out embedded types such as ObjectMeta in EndpointSlice and TLSClientConfig in rest.Config. No assertions change.

gopls check reports no hints for these files now. The server and discovery packages pass under --race and repeated runs on Linux.

Closes #171

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Container image available

Multi-arch image (amd64 + arm64):

podman pull ttl.sh/extractedprism:pr-175-1d

Note: Image is rebuilt on every commit and expires after 24 hours (hosted on ttl.sh).

Use t.Context() for run contexts that are only canceled by test
teardown, and drop spelled-out embedded types (ObjectMeta in
EndpointSlice literals, TLSClientConfig in rest.Config) from struct
literals. No assertions change.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
@lexfrei
lexfrei force-pushed the chore/test-modernize branch from d688d94 to 4e49437 Compare October 8, 2026 21:25
@lexfrei lexfrei changed the title chore(tests): apply gopls modernize hints in server tests chore(tests): apply gopls modernize hints in tests Oct 8, 2026
@lexfrei
lexfrei merged commit d69c132 into master Oct 8, 2026
8 checks passed
@lexfrei
lexfrei deleted the chore/test-modernize branch October 8, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(tests): apply gopls modernize hints in tests

1 participant