nixosTests.cloud-init: handleTest -> runTest

Changed files
+16 -25
nixos
+1 -1
nixos/tests/all-tests.nix
···
cjdns = runTest ./cjdns.nix;
clatd = runTest ./clatd.nix;
clickhouse = import ./clickhouse { inherit runTest; };
-
cloud-init = handleTest ./cloud-init.nix { };
cloud-init-hostname = handleTest ./cloud-init-hostname.nix { };
cloudlog = runTest ./cloudlog.nix;
cntr = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./cntr.nix { };
···
cjdns = runTest ./cjdns.nix;
clatd = runTest ./clatd.nix;
clickhouse = import ./clickhouse { inherit runTest; };
+
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 { };
+15 -24
nixos/tests/cloud-init.nix
···
-
{
-
system ? builtins.currentSystem,
-
config ? { },
-
pkgs ? import ../.. { inherit system config; },
-
}:
-
-
with import ../lib/testing-python.nix { inherit system pkgs; };
-
with pkgs.lib;
let
inherit (import ./ssh-keys.nix pkgs)
···
};
in
-
makeTest {
name = "cloud-init";
-
meta.maintainers = with pkgs.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;
};
testScript = ''
# To wait until cloud-init terminates its run
unnamed.wait_for_unit("cloud-init-local.service")
···
+
{ lib, pkgs, ... }:
let
inherit (import ./ssh-keys.nix pkgs)
···
};
in
+
{
name = "cloud-init";
+
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;
+
};
testScript = ''
# To wait until cloud-init terminates its run
unnamed.wait_for_unit("cloud-init-local.service")