agent trust bundle: retry the root fetch inside its start job so a dns blip at boot queues the harness instead of failing it
This commit is contained in:
parent
fec66af1c8
commit
abf21683b9
1 changed files with 158 additions and 5 deletions
18
nix/script-tests/retry-in-job.nix
Normal file
18
nix/script-tests/retry-in-job.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# `checks.script-test-retry-in-job` — runs ../host-modules/lib/retry-in-job.nix's
|
||||
# `retry_in_job` against a command that fails a set number of times. The cases
|
||||
# are in ./retry-in-job.sh.
|
||||
#
|
||||
# What runs is the rendered helper, sourced as the trust-bundle unit's script
|
||||
# includes it.
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
pkgs.runCommand "hyperhive-script-test-retry-in-job"
|
||||
{
|
||||
HELPER = pkgs.writeText "retry-in-job.sh" (import ../host-modules/lib/retry-in-job.nix { });
|
||||
}
|
||||
''
|
||||
${pkgs.bash}/bin/bash ${./retry-in-job.sh}
|
||||
touch "$out"
|
||||
''
|
||||
Loading…
Reference in a new issue