···
virtualisation.fileSystems."/".device = lib.mkForce "auto";
88
+
swap.configuration.swapDevices = lib.mkVMOverride [
89
+
{ device = "/swapfile"; size = 1; }
simpleService.configuration = {
systemd.services.test = {
wantedBy = [ "multi-user.target" ];
···
out = switch_to_specialisation("${machine}", "storeMountModified")
assert_lacks(out, "stopping the following units:")
assert_contains(out, "NOT restarting the following changed units: -.mount")
743
+
assert_contains(out, "reloading the following units: dbus.service\n")
744
+
assert_lacks(out, "\nrestarting the following units:")
745
+
assert_lacks(out, "\nstarting the following units:")
746
+
assert_lacks(out, "the following new units were started:")
748
+
with subtest("swaps"):
749
+
switch_to_specialisation("${machine}", "")
751
+
out = switch_to_specialisation("${machine}", "swap")
752
+
assert_lacks(out, "stopping the following units:")
753
+
assert_lacks(out, "NOT restarting the following changed units:")
754
+
assert_contains(out, "reloading the following units: dbus.service\n")
755
+
assert_lacks(out, "\nrestarting the following units:")
756
+
assert_lacks(out, "\nstarting the following units:")
757
+
assert_contains(out, "the following new units were started: swapfile.swap")
759
+
out = switch_to_specialisation("${machine}", "")
760
+
assert_contains(out, "stopping swap device: /swapfile")
761
+
assert_lacks(out, "stopping the following units:")
762
+
assert_lacks(out, "NOT restarting the following changed units:")
assert_contains(out, "reloading the following units: dbus.service\n")
assert_lacks(out, "\nrestarting the following units:")
assert_lacks(out, "\nstarting the following units:")