Watch
0
0
Fork
You've already forked hyperhive
0

nightly vm test: the builder's meta build finds a prebuilt agent in an offline store

This commit is contained in:
atlas 2026-11-01 20:21:35 +01:00
commit 4d85ec4c21

View file

@ -705,6 +705,25 @@ mod tests {
assert!(credential_helper().contains(&format!("${TOKEN_VAR}")));
}
/// `nix/vm-tests/swarm-builder-offline.nix` runs a copy of the build command:
/// its credential helper and `nix build` flags. Change those there when this
/// fails.
#[test]
fn the_vm_test_copy_matches() {
assert_eq!(
credential_helper(),
"!f() { test \"$1\" = get || return 0; p=; h=; \
while IFS='=' read -r k v; do case \"$k\" in '') break ;; protocol) p=$v ;; host) h=$v ;; esac; done; \
test -n \"$SWARM_BUILDER_GIT_HOST\" && test \"$p\" = https && test \"$h\" = \"$SWARM_BUILDER_GIT_HOST\" \
&& printf 'username=builder\\npassword=%s\\n' \"$SWARM_BUILDER_GIT_TOKEN\"; return 0; }; f"
);
assert_eq!(
BUILD_FLAGS.join(" "),
"build --no-link --print-out-paths --no-write-lock-file \
--option accept-flake-config false --print-build-logs"
);
}
#[test]
fn a_job_that_would_bend_the_reference_is_refused() {
for bad in [