Repository navigation
test: stop withViper pinning keys for later tests - #1164
Merged
Merged
Conversation
Its cleanup restored a key with viper.Set(key, orig), which leaves an override -- the highest-priority layer -- holding the old value for the rest of the package's tests. Under -shuffle, when a root_provider test ran before TestCreateFlagsBindToViper, --fc-binary could no longer change fc.binPath and the build failed (main has been red since 2026-10-02). Clear the override with a nil Set instead, which viper skips in favour of flags, config and defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U8g3mHkS6JmtYVYc4AjcV4 (cherry picked from commit 3e8d98c)
cdalar
enabled auto-merge (squash)
October 4, 2026 16:38
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1164 +/- ##
=======================================
Coverage 36.93% 36.93%
=======================================
Files 51 51
Lines 5656 5656
=======================================
Hits 2089 2089
Misses 3567 3567 β View full report in Codecov by Harness. π New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
main's build, which has failed intermittently since 2026-10-02. This was meant to be part of #1158, but that PR was merged before this commit was pushed.withViper, incmd/root_provider_test.go, restored a key withviper.Set(key, orig). That leaves a permanent override in viper's highest-priority layer.-shuffle=on, when a root_provider test runs beforeTestCreateFlagsBindToViper,--fc-binarycan no longer changefc.binPath, and the test fails (expected "/usr/local/bin/firecracker", actual "firecracker").viper.Set(key, nil)instead. Viper skips a nil override and falls through to flags, config and defaults.HOME(as on CI) with-shuffleseeds 1β12; seeds 3 and 6 failed before the fix and pass now. The fullgo test -race -shuffle=on ./...is clean.π€ Generated with Claude Code
https://claude.ai/code/session_01U8g3mHkS6JmtYVYc4AjcV4