Repository navigation
test(sdk): share the verified test bundle writer - #13113
Merged
Merged
Conversation
deployment.rs and scripted_tofu.rs each wrote a bundle whose manifest verifies; scripted_tofu.rs kept a copy because deployment.rs also runs on Windows. tests/support/bundle.rs now writes both: without a script every file is non-executable, and with one libexec/tofu is that script, which needs Unix.
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.
deployment.rsandscripted_tofu.rsnow share one test bundle writer.Stacked on #13112.
Why
Both tests wrote a bundle whose manifest verifies.
scripted_tofu.rs(#13081) kept a copy ofdeployment.rs::write_bundlethat differed only forlibexec/tofu, becausedeployment.rsalso runs on Windows and the scripted copy needs Unix.Change
tests/support/bundle.rsaddswrite_bundle(directory, tofu: Option<&str>). Without a script, every file is a non-executable fixture. With one,libexec/tofuis that script, written withwrite_executablefrom test: write test executables out of process #13111. Passing a script on a platform other than Unix panics.deployment.rsandscripted_tofu.rscall it and drop their own copies.I left two other duplicates alone:
Eventsinnemoclaw-e2e/tests/helm_recovery.rs, which is two methods long.Snapshotthere andUntouchedinkubernetes_interruption.rs, which check different state.Both sit in other crates, so sharing them would mean adding them to
nemoclaw-test-fixturesfor little gain.Validation
cargo test -p nemoclaw-sdk --test integration: 444 passed.cargo cion linux_arm64: all steps passed. GitHub CI checks the Windows build ofdeployment.rs; I couldn't cross-compile it here.