about summary refs log tree commit diff
path: root/nixos/tests/rshim.nix
diff options
context:
space:
mode:
authornikstur <nikstur@outlook.com>2023-05-15 14:09:28 +0200
committernikstur <nikstur@outlook.com>2023-05-15 14:09:28 +0200
commit46dfed6010a624a7aec49bbc63752847ae3ff15a (patch)
treec97a75ced10b701cb6ca96d803ec32013b060ea3 /nixos/tests/rshim.nix
parent6852dc2359784c34941270d3f9532b0d7cfcd225 (diff)
nixos/tests/rshim: init
Diffstat (limited to 'nixos/tests/rshim.nix')
-rw-r--r--nixos/tests/rshim.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/tests/rshim.nix b/nixos/tests/rshim.nix
new file mode 100644
index 0000000000000..bb5cce028ae79
--- /dev/null
+++ b/nixos/tests/rshim.nix
@@ -0,0 +1,25 @@
+{ system ? builtins.currentSystem
+, config ? { }
+, pkgs ? import ../.. { inherit system config; }
+}:
+
+with import ../lib/testing-python.nix { inherit system pkgs; };
+with pkgs.lib;
+
+{
+  basic = makeTest {
+    name = "rshim";
+    meta.maintainers = with maintainers; [ nikstur ];
+
+    nodes.machine = { config, pkgs, ... }: {
+      services.rshim.enable = true;
+    };
+
+    testScript = { nodes, ... }: ''
+      machine.start()
+      machine.wait_for_unit("multi-user.target")
+
+      print(machine.succeed("systemctl status rshim.service"))
+    '';
+  };
+}