From 3365666840152b7b1ef2a97f171102575b6d743f Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Sun, 20 Mar 2022 16:11:32 -0400 Subject: [PATCH] systemd-initrd: Basic test case --- nixos/tests/all-tests.nix | 1 + nixos/tests/systemd-initrd-simple.nix | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 nixos/tests/systemd-initrd-simple.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 98ca2e081086..8d8596873b8c 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -505,6 +505,7 @@ in systemd-confinement = handleTest ./systemd-confinement.nix {}; systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {}; systemd-escaping = handleTest ./systemd-escaping.nix {}; + systemd-initrd-simple = handleTest ./systemd-initrd-simple.nix {}; systemd-journal = handleTest ./systemd-journal.nix {}; systemd-machinectl = handleTest ./systemd-machinectl.nix {}; systemd-networkd = handleTest ./systemd-networkd.nix {}; diff --git a/nixos/tests/systemd-initrd-simple.nix b/nixos/tests/systemd-initrd-simple.nix new file mode 100644 index 000000000000..d0786239b516 --- /dev/null +++ b/nixos/tests/systemd-initrd-simple.nix @@ -0,0 +1,11 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "systemd-initrd-simple"; + + machine = { pkgs, ... }: { + boot.initrd.systemd.enable = true; + }; + + testScript = '' + machine.wait_for_unit("basic.target") + ''; +})