nightly vm test: the builder's meta build finds a prebuilt agent in an offline store
This commit is contained in:
parent
90272ec3c0
commit
4d85ec4c21
1 changed files with 508 additions and 2 deletions
|
|
@ -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 [
|
||||
|
|
|
|||
Loading…
Reference in a new issue