about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLily Foster <lily@lily.flowers>2023-06-27 16:00:41 -0400
committerGitHub <noreply@github.com>2023-06-27 16:00:41 -0400
commit73710c4a5bf602ee53ad9f78b1c5bb8a9a07eaaf (patch)
tree2a26d54d23e1bdcf177b01d621f22739a07118f6 /nixos
parent35337085ea05e9a7ea7519724eb8507fb0580d78 (diff)
parentcc3a3c40a2cc2eadb1c55ea44260817090f12cb3 (diff)
Merge pull request #238848 from nikstur/qemu-vm-volatile-root
nixos/tests/qemu-vm-volatile-root: init
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/qemu-vm-volatile-root.nix17
2 files changed, 18 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 0788394eb39e2..371546fe60e6b 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -646,6 +646,7 @@ in {
   pulseaudio = discoverTests (import ./pulseaudio.nix);
   qboot = handleTestOn ["x86_64-linux" "i686-linux"] ./qboot.nix {};
   qemu-vm-restrictnetwork = handleTest ./qemu-vm-restrictnetwork.nix {};
+  qemu-vm-volatile-root = runTest ./qemu-vm-volatile-root.nix;
   quorum = handleTest ./quorum.nix {};
   quake3 = handleTest ./quake3.nix {};
   qownnotes = handleTest ./qownnotes.nix {};
diff --git a/nixos/tests/qemu-vm-volatile-root.nix b/nixos/tests/qemu-vm-volatile-root.nix
new file mode 100644
index 0000000000000..bc8fd853409db
--- /dev/null
+++ b/nixos/tests/qemu-vm-volatile-root.nix
@@ -0,0 +1,17 @@
+# Test that the root filesystem is a volatile tmpfs.
+
+{ lib, ... }:
+
+{
+  name = "qemu-vm-volatile-root";
+
+  meta.maintainers = with lib.maintainers; [ nikstur ];
+
+  nodes.machine = _: {
+    virtualisation.diskImage = null;
+  };
+
+  testScript = ''
+    machine.succeed("findmnt --kernel --types tmpfs /")
+  '';
+}