diff options
author | Christian Kampka <christian@kampka.net> | 2019-12-15 19:42:21 +0100 |
---|---|---|
committer | Christian Kampka <christian@kampka.net> | 2019-12-15 19:42:21 +0100 |
commit | 8c683b3b137559c286b2a2f534ba4eb402753a16 (patch) | |
tree | 546e50b1573836d473c4538c21b7caa6c6d0aec9 /nixos/tests | |
parent | e51673bb77d6594b4e044c20f1a4a54677c56821 (diff) | |
download | nixpkgs-8c683b3b137559c286b2a2f534ba4eb402753a16.tar nixpkgs-8c683b3b137559c286b2a2f534ba4eb402753a16.tar.gz nixpkgs-8c683b3b137559c286b2a2f534ba4eb402753a16.tar.bz2 nixpkgs-8c683b3b137559c286b2a2f534ba4eb402753a16.tar.lz nixpkgs-8c683b3b137559c286b2a2f534ba4eb402753a16.tar.xz nixpkgs-8c683b3b137559c286b2a2f534ba4eb402753a16.tar.zst nixpkgs-8c683b3b137559c286b2a2f534ba4eb402753a16.zip |
nixosTests.nesting: Port tests to python
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/nesting.nix | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/nixos/tests/nesting.nix b/nixos/tests/nesting.nix index 1306d6f8e0c..6388b67a6e4 100644 --- a/nixos/tests/nesting.nix +++ b/nixos/tests/nesting.nix @@ -1,4 +1,4 @@ -import ./make-test.nix { +import ./make-test-python.nix { name = "nesting"; nodes = { clone = { pkgs, ... }: { @@ -19,24 +19,26 @@ import ./make-test.nix { }; }; testScript = '' - $clone->waitForUnit("default.target"); - $clone->succeed("cowsay hey"); - $clone->fail("hello"); + clone.wait_for_unit("default.target") + clone.succeed("cowsay hey") + clone.fail("hello") - # Nested clones do inherit from parent - $clone->succeed("/run/current-system/fine-tune/child-1/bin/switch-to-configuration test"); - $clone->succeed("cowsay hey"); - $clone->succeed("hello"); + with subtest("Nested clones do inherit from parent"): + clone.succeed( + "/run/current-system/fine-tune/child-1/bin/switch-to-configuration test" + ) + clone.succeed("cowsay hey") + clone.succeed("hello") + children.wait_for_unit("default.target") + children.succeed("cowsay hey") + children.fail("hello") - $children->waitForUnit("default.target"); - $children->succeed("cowsay hey"); - $children->fail("hello"); - - # Nested children do not inherit from parent - $children->succeed("/run/current-system/fine-tune/child-1/bin/switch-to-configuration test"); - $children->fail("cowsay hey"); - $children->succeed("hello"); - + with subtest("Nested children do not inherit from parent"): + children.succeed( + "/run/current-system/fine-tune/child-1/bin/switch-to-configuration test" + ) + children.fail("cowsay hey") + children.succeed("hello") ''; } |