nixosTests.nesting: Port tests to python
This commit is contained in:
parent
e51673bb77
commit
8c683b3b13
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix {
|
import ./make-test-python.nix {
|
||||||
name = "nesting";
|
name = "nesting";
|
||||||
nodes = {
|
nodes = {
|
||||||
clone = { pkgs, ... }: {
|
clone = { pkgs, ... }: {
|
||||||
|
@ -19,24 +19,26 @@ import ./make-test.nix {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
testScript = ''
|
testScript = ''
|
||||||
$clone->waitForUnit("default.target");
|
clone.wait_for_unit("default.target")
|
||||||
$clone->succeed("cowsay hey");
|
clone.succeed("cowsay hey")
|
||||||
$clone->fail("hello");
|
clone.fail("hello")
|
||||||
|
|
||||||
# Nested clones do inherit from parent
|
with subtest("Nested clones do inherit from parent"):
|
||||||
$clone->succeed("/run/current-system/fine-tune/child-1/bin/switch-to-configuration test");
|
clone.succeed(
|
||||||
$clone->succeed("cowsay hey");
|
"/run/current-system/fine-tune/child-1/bin/switch-to-configuration test"
|
||||||
$clone->succeed("hello");
|
)
|
||||||
|
clone.succeed("cowsay hey")
|
||||||
|
clone.succeed("hello")
|
||||||
|
|
||||||
|
children.wait_for_unit("default.target")
|
||||||
|
children.succeed("cowsay hey")
|
||||||
|
children.fail("hello")
|
||||||
|
|
||||||
$children->waitForUnit("default.target");
|
with subtest("Nested children do not inherit from parent"):
|
||||||
$children->succeed("cowsay hey");
|
children.succeed(
|
||||||
$children->fail("hello");
|
"/run/current-system/fine-tune/child-1/bin/switch-to-configuration test"
|
||||||
|
)
|
||||||
# Nested children do not inherit from parent
|
children.fail("cowsay hey")
|
||||||
$children->succeed("/run/current-system/fine-tune/child-1/bin/switch-to-configuration test");
|
children.succeed("hello")
|
||||||
$children->fail("cowsay hey");
|
|
||||||
$children->succeed("hello");
|
|
||||||
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue