From cc3a3c40a2cc2eadb1c55ea44260817090f12cb3 Mon Sep 17 00:00:00 2001 From: nikstur Date: Wed, 21 Jun 2023 01:38:27 +0200 Subject: [PATCH] nixos/tests/qemu-vm-volatile-root: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/qemu-vm-volatile-root.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 nixos/tests/qemu-vm-volatile-root.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 5e846fc83d1a..63b2700ae518 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -641,6 +641,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 000000000000..bc8fd853409d --- /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 /") + ''; +}