python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / nixos / tests / specialisation.nix
blobb8d4b8279f4da2c1ab1637360cadd8b546e34cac
1 import ./make-test-python.nix {
2   name = "specialisation";
3   nodes =  {
4     inheritconf = { pkgs, ... }: {
5       environment.systemPackages = [ pkgs.cowsay ];
6       specialisation.inheritconf.configuration = { pkgs, ... }: {
7         environment.systemPackages = [ pkgs.hello ];
8       };
9     };
10     noinheritconf = { pkgs, ... }: {
11       environment.systemPackages = [ pkgs.cowsay ];
12       specialisation.noinheritconf = {
13         inheritParentConfig = false;
14         configuration = { pkgs, ... }: {
15           environment.systemPackages = [ pkgs.hello ];
16         };
17       };
18     };
19   };
20   testScript = ''
21     inheritconf.wait_for_unit("default.target")
22     inheritconf.succeed("cowsay hey")
23     inheritconf.fail("hello")
25     with subtest("Nested clones do inherit from parent"):
26         inheritconf.succeed(
27             "/run/current-system/specialisation/inheritconf/bin/switch-to-configuration test"
28         )
29         inheritconf.succeed("cowsay hey")
30         inheritconf.succeed("hello")
32         noinheritconf.wait_for_unit("default.target")
33         noinheritconf.succeed("cowsay hey")
34         noinheritconf.fail("hello")
36     with subtest("Nested children do not inherit from parent"):
37         noinheritconf.succeed(
38             "/run/current-system/specialisation/noinheritconf/bin/switch-to-configuration test"
39         )
40         noinheritconf.fail("cowsay hey")
41         noinheritconf.succeed("hello")
42   '';