Skip to content

fix: Fix printf format verbs in test files#1389

Merged
georgidimdimitrov merged 2 commits intomainfrom
fix-printf-format-verbs-in-tests
Mar 9, 2026
Merged

fix: Fix printf format verbs in test files#1389
georgidimdimitrov merged 2 commits intomainfrom
fix-printf-format-verbs-in-tests

Conversation

@georgidimdimitrov
Copy link
Copy Markdown
Member

Summary

  • Fix go vet printf format verb errors that are causing CI failures on all open PRs
  • pkg/varcontext/varcontext_test.go: Changed %q to %d for int type arguments in TestVarContext_GetInt
  • internal/brokerpak/fetcher/fetch_test.go: Changed %q to %v for getter.ClientMode type arguments in TestNewFileGetterClient

Context

All 6 open dependabot PRs (#1383, #1384, #1385, #1386, #1387, #1388) are failing with the same two go vet errors:

  1. Errorf format %q has arg tc.Expected of wrong type int
  2. Errorf format %q has arg getter.ClientModeFile of wrong type github.com/hashicorp/go-getter.ClientMode

These are pre-existing issues on main that block all PRs from merging. Once this fix lands, re-running CI on those PRs should make them pass.

Test plan

  • go vet passes locally on both packages
  • go test passes locally on both packages
  • CI passes on this PR
  • Re-run CI on blocked dependabot PRs after merge

The go vet printf analyzer flagged two test files for using %q with
non-string types, causing CI failures on all open PRs:
- varcontext_test.go: %q used for int values, changed to %d
- fetch_test.go: %q used for getter.ClientMode values, changed to %v
  Also fixed the error message to say "Mode" instead of "Dst".

ai-assisted=yes

Made-with: Cursor
@georgidimdimitrov georgidimdimitrov changed the title Fix printf format verbs in test files fix: Fix printf format verbs in test files Mar 9, 2026
@georgidimdimitrov georgidimdimitrov merged commit db2be6d into main Mar 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants