Bump golangci-lint to 2.3.0 and fix issues

This commit is contained in:
Joshua Casey
2025-07-30 10:25:23 -05:00
parent b387a2cae9
commit 1c1b3b7f2e
16 changed files with 41 additions and 31 deletions
+2 -1
View File
@@ -154,7 +154,8 @@ func runKubectlGetNamespaces(t *testing.T, kubeConfigYAML string) (string, error
f := writeStringToTempFile(t, "pinniped-generated-kubeconfig-*", kubeConfigYAML)
//nolint:gosec // It's okay that we are passing f.Name() to an exec command here. It was created above.
output, err := exec.Command(
output, err := exec.CommandContext(
t.Context(),
"kubectl", "get", "namespace", "--kubeconfig", f.Name(),
).CombinedOutput()
+1 -1
View File
@@ -42,7 +42,7 @@ func PinnipedCLIPath(t *testing.T) string {
t.Log("building pinniped CLI binary")
start := time.Now()
output, err := exec.Command("go", "build", "-o", path, "go.pinniped.dev/cmd/pinniped").CombinedOutput()
output, err := exec.CommandContext(t.Context(), "go", "build", "-o", path, "go.pinniped.dev/cmd/pinniped").CombinedOutput()
require.NoError(t, err, string(output))
t.Logf("built CLI binary in %s", time.Since(start).Round(time.Millisecond))