diff options
author | Florian Klink <flokli@flokli.de> | 2019-11-23 23:05:12 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-11-23 23:08:46 +0100 |
commit | a8a552da536463495c7abd71934509483e5a731d (patch) | |
tree | 729915698ac03911e7bda0fd13439f7da8bedd30 /nixos/tests/systemd-nspawn.nix | |
parent | 937ec235b7aa22dbfc1c9271153b43448141570d (diff) |
nixosTests.systemd-nspawn: convert test to python
also fix a wrong test name ;-)
Diffstat (limited to 'nixos/tests/systemd-nspawn.nix')
-rw-r--r-- | nixos/tests/systemd-nspawn.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/nixos/tests/systemd-nspawn.nix b/nixos/tests/systemd-nspawn.nix index c2039bb5980c9..5bf55060d2e03 100644 --- a/nixos/tests/systemd-nspawn.nix +++ b/nixos/tests/systemd-nspawn.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({pkgs, lib, ...}: +import ./make-test-python.nix ({pkgs, lib, ...}: let gpgKeyring = (pkgs.runCommand "gpg-keyring" { buildInputs = [ pkgs.gnupg ]; } '' mkdir -p $out @@ -32,7 +32,7 @@ let gpg --batch --sign --detach-sign --output SHA256SUMS.gpg SHA256SUMS ''); in { - name = "opensmtpd"; + name = "systemd-nspawn"; nodes = { server = { pkgs, ... }: { @@ -48,11 +48,13 @@ in { }; testScript = '' - startAll; + start_all() - $server->waitForUnit("nginx.service"); - $client->waitForUnit("network-online.target"); - $client->succeed("machinectl pull-raw --verify=signature http://server/testimage.raw"); - $client->succeed("cmp /var/lib/machines/testimage.raw ${nspawnImages}/testimage.raw"); + server.wait_for_unit("nginx.service") + client.wait_for_unit("network-online.target") + client.succeed("machinectl pull-raw --verify=signature http://server/testimage.raw") + client.succeed( + "cmp /var/lib/machines/testimage.raw ${nspawnImages}/testimage.raw" + ) ''; }) |