tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixosTests.cloud-init: handleTest -> runTest
Sizhe Zhao
6 months ago
3faac88e
950a25ab
+16
-25
2 changed files
expand all
collapse all
unified
split
nixos
tests
all-tests.nix
cloud-init.nix
+1
-1
nixos/tests/all-tests.nix
···
318
318
cjdns = runTest ./cjdns.nix;
319
319
clatd = runTest ./clatd.nix;
320
320
clickhouse = import ./clickhouse { inherit runTest; };
321
321
-
cloud-init = handleTest ./cloud-init.nix { };
321
321
+
cloud-init = runTest ./cloud-init.nix;
322
322
cloud-init-hostname = handleTest ./cloud-init-hostname.nix { };
323
323
cloudlog = runTest ./cloudlog.nix;
324
324
cntr = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./cntr.nix { };
+15
-24
nixos/tests/cloud-init.nix
···
1
1
-
{
2
2
-
system ? builtins.currentSystem,
3
3
-
config ? { },
4
4
-
pkgs ? import ../.. { inherit system config; },
5
5
-
}:
6
6
-
7
7
-
with import ../lib/testing-python.nix { inherit system pkgs; };
8
8
-
with pkgs.lib;
1
1
+
{ lib, pkgs, ... }:
9
2
10
3
let
11
4
inherit (import ./ssh-keys.nix pkgs)
···
61
54
};
62
55
63
56
in
64
64
-
makeTest {
57
57
+
{
65
58
name = "cloud-init";
66
66
-
meta.maintainers = with pkgs.lib.maintainers; [
59
59
+
meta.maintainers = with lib.maintainers; [
67
60
lewo
68
61
illustris
69
62
];
70
70
-
nodes.machine =
71
71
-
{ ... }:
72
72
-
{
73
73
-
virtualisation.qemu.options = [
74
74
-
"-cdrom"
75
75
-
"${metadataDrive}/metadata.iso"
76
76
-
];
77
77
-
services.cloud-init = {
78
78
-
enable = true;
79
79
-
network.enable = true;
80
80
-
};
81
81
-
services.openssh.enable = true;
82
82
-
networking.hostName = "";
83
83
-
networking.useDHCP = false;
63
63
+
nodes.machine = {
64
64
+
virtualisation.qemu.options = [
65
65
+
"-cdrom"
66
66
+
"${metadataDrive}/metadata.iso"
67
67
+
];
68
68
+
services.cloud-init = {
69
69
+
enable = true;
70
70
+
network.enable = true;
84
71
};
72
72
+
services.openssh.enable = true;
73
73
+
networking.hostName = "";
74
74
+
networking.useDHCP = false;
75
75
+
};
85
76
testScript = ''
86
77
# To wait until cloud-init terminates its run
87
78
unnamed.wait_for_unit("cloud-init-local.service")