Skip to content

test(updater): make not-installed test hermetic (force empty resolution dir) (#571)#37

Merged
MichaelTaylor3d merged 1 commit into
mainfrom
test/571-deterministic-updater-test
Jul 14, 2026
Merged

test(updater): make not-installed test hermetic (force empty resolution dir) (#571)#37
MichaelTaylor3d merged 1 commit into
mainfrom
test/571-deterministic-updater-test

Conversation

@MichaelTaylor3d

Copy link
Copy Markdown
Contributor

Summary

Fix non-deterministic test in dig-node-service::updater: every_mutation_reports_not_installed_when_no_binary_resolves was failing on dev machines that have dig-updater installed, because it assumed the binary wouldn't exist locally.

Fix: Add CLI_BIN_RESOLUTION_DIRS_ENV to allow tests to override the conventional bin directories with an empty directory, making binary resolution fail deterministically.

Changes

  • Add new env var DIG_UPDATER_BIN_RESOLUTION_DIRS that overrides conventional_bin_dirs()
  • Modify conventional_bin_dirs() to check the env var first (supports semicolon-separated dir list)
  • Update the test to create an empty temp directory and use it as the resolution fallback
  • Bump version: 0.31.0 → 0.31.1 (patch)

Test plan

  • Target test updater::tests::every_mutation_reports_not_installed_when_no_binary_resolves passes
  • Full test suite passes (cargo test --locked)
  • cargo clippy --all-targets --all-features --locked -- -D warnings passes
  • cargo fmt --all -- --check passes

…on dir) (#571)

Add CLI_BIN_RESOLUTION_DIRS_ENV to override the conventional bin directories
for tests, allowing the test to force an empty resolution directory. This makes
the 'every_mutation_reports_not_installed_when_no_binary_resolves' test pass
deterministically regardless of whether dig-updater is installed locally.

Also bump version from 0.31.0 to 0.31.1 (patch).

Co-Authored-By: Claude <noreply@anthropic.com>
@MichaelTaylor3d MichaelTaylor3d merged commit 81ef936 into main Jul 14, 2026
13 checks passed
@MichaelTaylor3d MichaelTaylor3d deleted the test/571-deterministic-updater-test branch July 14, 2026 11:30
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.

1 participant