Skip to content

Commit f6c0d09

Browse files
dependabot[bot]antifuchs
authored andcommitted
Sequence the nixos tests slightly better
* systemd: Wait for the hoopsnake unit to be up * scripted-stage2: Generate authkeys with --reusable, that should ensure headscale doesn't crash.
1 parent f8a593b commit f6c0d09

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nixos/tests/flake-part.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
6767
headscale users create --config ./config.yaml bob
6868
api_key="$(headscale apikeys create --config ./config.yaml)"
69-
auth_key="$(headscale preauthkeys create --config ./config.yaml -u bob)"
69+
auth_key="$(headscale preauthkeys create --reusable -e 24h --config ./config.yaml -u bob)"
7070
cat >$out/apikey-envfile <<EOF
7171
TS_API_KEY=$api_key
7272
TS_BASE_URL=${config.server_url}
@@ -201,6 +201,7 @@
201201
imports = [bootloader self.nixosModules.default];
202202
boot.initrd.preLVMCommands = ''
203203
while ! [ -f /tmp/fnord ] ; do
204+
pgrep $hoopsnakePid
204205
sleep 1
205206
done
206207
'';
@@ -344,6 +345,7 @@
344345
345346
with subtest("Unlock alice's boot progress"):
346347
alice.start()
348+
alice.wait_for_unit("hoopsnake")
347349
alice_ip = wait_for_hoopsnake_registered("alice-boot")
348350
bob.succeed(f"ssh-to-alice {alice_ip}", timeout=90)
349351
alice.wait_until_succeeds("test -f /tmp/fnord")

0 commit comments

Comments
 (0)