diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 1d31318a6dc3..838a04b0577b 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -318,7 +318,7 @@ in cjdns = runTest ./cjdns.nix; clatd = runTest ./clatd.nix; clickhouse = import ./clickhouse { inherit runTest; }; - cloud-init = handleTest ./cloud-init.nix { }; + cloud-init = runTest ./cloud-init.nix; cloud-init-hostname = handleTest ./cloud-init-hostname.nix { }; cloudlog = runTest ./cloudlog.nix; cntr = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./cntr.nix { }; diff --git a/nixos/tests/cloud-init.nix b/nixos/tests/cloud-init.nix index 8ab0bbbd9851..7c8b1c80e251 100644 --- a/nixos/tests/cloud-init.nix +++ b/nixos/tests/cloud-init.nix @@ -1,11 +1,4 @@ -{ - system ? builtins.currentSystem, - config ? { }, - pkgs ? import ../.. { inherit system config; }, -}: - -with import ../lib/testing-python.nix { inherit system pkgs; }; -with pkgs.lib; +{ lib, pkgs, ... }: let inherit (import ./ssh-keys.nix pkgs) @@ -61,27 +54,25 @@ let }; in -makeTest { +{ name = "cloud-init"; - meta.maintainers = with pkgs.lib.maintainers; [ + meta.maintainers = with lib.maintainers; [ lewo illustris ]; - nodes.machine = - { ... }: - { - virtualisation.qemu.options = [ - "-cdrom" - "${metadataDrive}/metadata.iso" - ]; - services.cloud-init = { - enable = true; - network.enable = true; - }; - services.openssh.enable = true; - networking.hostName = ""; - networking.useDHCP = false; + nodes.machine = { + virtualisation.qemu.options = [ + "-cdrom" + "${metadataDrive}/metadata.iso" + ]; + services.cloud-init = { + enable = true; + network.enable = true; }; + services.openssh.enable = true; + networking.hostName = ""; + networking.useDHCP = false; + }; testScript = '' # To wait until cloud-init terminates its run unnamed.wait_for_unit("cloud-init-local.service")