diff --git a/nixos/tests/boot.nix b/nixos/tests/boot.nix index cf5565667131..ec2a9f6527c9 100644 --- a/nixos/tests/boot.nix +++ b/nixos/tests/boot.nix @@ -38,7 +38,6 @@ let } // extraConfig); in makeTest { - inherit iso; name = "boot-" + name; nodes = { }; testScript = diff --git a/nixos/tests/caddy.nix b/nixos/tests/caddy.nix index 0902904b2086..16436ab52800 100644 --- a/nixos/tests/caddy.nix +++ b/nixos/tests/caddy.nix @@ -7,7 +7,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { nodes = { webserver = { pkgs, lib, ... }: { services.caddy.enable = true; - services.caddy.config = '' + services.caddy.extraConfig = '' http://localhost { encode gzip @@ -22,7 +22,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { ''; specialisation.etag.configuration = { - services.caddy.config = lib.mkForce '' + services.caddy.extraConfig = lib.mkForce '' http://localhost { encode gzip @@ -38,7 +38,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { }; specialisation.config-reload.configuration = { - services.caddy.config = '' + services.caddy.extraConfig = '' http://localhost:8080 { } ''; diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix index 29e7c279d69a..556546beee76 100644 --- a/nixos/tests/ceph-multi-node.nix +++ b/nixos/tests/ceph-multi-node.nix @@ -48,7 +48,7 @@ let sudo ceph xfsprogs - netcat-openbsd + libressl.nc ]; boot.kernelModules = [ "xfs" ]; diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix index 8965646bc5dc..3815dca76220 100644 --- a/nixos/tests/chromium.nix +++ b/nixos/tests/chromium.nix @@ -15,26 +15,9 @@ with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; -mapAttrs (channel: chromiumPkg: makeTest rec { - name = "chromium-${channel}"; - meta = { - maintainers = with maintainers; [ aszlig primeos ]; - # https://github.com/NixOS/hydra/issues/591#issuecomment-435125621 - inherit (chromiumPkg.meta) timeout; - }; - - enableOCR = true; - +let user = "alice"; - machine.imports = [ ./common/user-account.nix ./common/x11.nix ]; - machine.virtualisation.memorySize = 2047; - machine.test-support.displayManager.auto.user = user; - machine.environment = { - systemPackages = [ chromiumPkg ]; - variables."XAUTHORITY" = "/home/alice/.Xauthority"; - }; - startupHTML = pkgs.writeText "chromium-startup.html" '' @@ -50,6 +33,25 @@ mapAttrs (channel: chromiumPkg: makeTest rec { ''; +in + +mapAttrs (channel: chromiumPkg: makeTest { + name = "chromium-${channel}"; + meta = { + maintainers = with maintainers; [ aszlig primeos ]; + # https://github.com/NixOS/hydra/issues/591#issuecomment-435125621 + inherit (chromiumPkg.meta) timeout; + }; + + enableOCR = true; + + machine.imports = [ ./common/user-account.nix ./common/x11.nix ]; + machine.virtualisation.memorySize = 2047; + machine.test-support.displayManager.auto.user = user; + machine.environment = { + systemPackages = [ chromiumPkg ]; + variables."XAUTHORITY" = "/home/alice/.Xauthority"; + }; testScript = let xdo = name: text: let diff --git a/nixos/tests/cri-o.nix b/nixos/tests/cri-o.nix index 91d46657f241..d3a8713d6a9b 100644 --- a/nixos/tests/cri-o.nix +++ b/nixos/tests/cri-o.nix @@ -1,7 +1,7 @@ # This test runs CRI-O and verifies via critest import ./make-test-python.nix ({ pkgs, ... }: { name = "cri-o"; - maintainers = with pkgs.lib.maintainers; teams.podman.members; + meta.maintainers = with pkgs.lib.maintainers; teams.podman.members; nodes = { crio = { diff --git a/nixos/tests/gitolite-fcgiwrap.nix b/nixos/tests/gitolite-fcgiwrap.nix index 38f8d5c883fd..abf1db37003a 100644 --- a/nixos/tests/gitolite-fcgiwrap.nix +++ b/nixos/tests/gitolite-fcgiwrap.nix @@ -20,7 +20,7 @@ import ./make-test-python.nix ( nodes = { server = - { ... }: + { config, ... }: { networking.firewall.allowedTCPPorts = [ 80 ]; diff --git a/nixos/tests/jitsi-meet.nix b/nixos/tests/jitsi-meet.nix index d95f7c2ea9ea..41d53bc73800 100644 --- a/nixos/tests/jitsi-meet.nix +++ b/nixos/tests/jitsi-meet.nix @@ -21,9 +21,9 @@ import ./make-test-python.nix ({ pkgs, ... }: { forceSSL = true; }; - security.acme.email = "me@example.org"; security.acme.acceptTerms = true; - security.acme.server = "https://example.com"; # self-signed only + security.acme.defaults.email = "me@example.org"; + security.acme.defaults.server = "https://example.com"; # self-signed only }; }; diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix index 0587912c9a22..02513c4726c1 100644 --- a/nixos/tests/misc.nix +++ b/nixos/tests/misc.nix @@ -1,13 +1,13 @@ # Miscellaneous small tests that don't warrant their own VM run. -import ./make-test-python.nix ({ pkgs, ...} : rec { +import ./make-test-python.nix ({ pkgs, ...} : let + foo = pkgs.writeText "foo" "Hello World"; +in { name = "misc"; meta = with pkgs.lib.maintainers; { maintainers = [ eelco ]; }; - foo = pkgs.writeText "foo" "Hello World"; - machine = { lib, ... }: with lib; diff --git a/nixos/tests/rstudio-server.nix b/nixos/tests/rstudio-server.nix index c7ac7670fbd4..dd5fe3e5b440 100644 --- a/nixos/tests/rstudio-server.nix +++ b/nixos/tests/rstudio-server.nix @@ -14,12 +14,6 @@ import ./make-test-python.nix ({ pkgs, ... }: }; }; - users.testuser = { - uid = 1000; - group = "testgroup"; - }; - groups.testgroup.gid = 1000; - testScript = '' machine.wait_for_unit("rstudio-server.service") machine.succeed("curl -f -vvv -s http://127.0.0.1:8787") diff --git a/nixos/tests/step-ca.nix b/nixos/tests/step-ca.nix index b22bcb060f2b..f21bd5366266 100644 --- a/nixos/tests/step-ca.nix +++ b/nixos/tests/step-ca.nix @@ -42,8 +42,8 @@ import ./make-test-python.nix ({ pkgs, ... }: caclient = { config, pkgs, ... }: { - security.acme.server = "https://caserver:8443/acme/acme/directory"; - security.acme.email = "root@example.org"; + security.acme.defaults.server = "https://caserver:8443/acme/acme/directory"; + security.acme.defaults.email = "root@example.org"; security.acme.acceptTerms = true; security.pki.certificateFiles = [ "${test-certificates}/root_ca.crt" ]; diff --git a/nixos/tests/tor.nix b/nixos/tests/tor.nix index c061f59226cf..71ec9df4641f 100644 --- a/nixos/tests/tor.nix +++ b/nixos/tests/tor.nix @@ -1,24 +1,19 @@ import ./make-test-python.nix ({ lib, ... }: with lib; -rec { +{ name = "tor"; meta.maintainers = with maintainers; [ joachifm ]; - common = - { ... }: - { boot.kernelParams = [ "audit=0" "apparmor=0" "quiet" ]; - networking.firewall.enable = false; - networking.useDHCP = false; - }; + nodes.client = { pkgs, ... }: { + boot.kernelParams = [ "audit=0" "apparmor=0" "quiet" ]; + networking.firewall.enable = false; + networking.useDHCP = false; - nodes.client = - { pkgs, ... }: - { imports = [ common ]; - environment.systemPackages = with pkgs; [ netcat ]; - services.tor.enable = true; - services.tor.client.enable = true; - services.tor.settings.ControlPort = 9051; - }; + environment.systemPackages = with pkgs; [ netcat ]; + services.tor.enable = true; + services.tor.client.enable = true; + services.tor.settings.ControlPort = 9051; + }; testScript = '' client.wait_for_unit("tor.service") diff --git a/nixos/tests/without-nix.nix b/nixos/tests/without-nix.nix index 2fc00b04144f..93f1d0186047 100644 --- a/nixos/tests/without-nix.nix +++ b/nixos/tests/without-nix.nix @@ -4,12 +4,6 @@ import ./make-test-python.nix ({ lib, ... }: { maintainers = [ ericson2314 ]; }; - nixpkgs.overlays = [ - (self: super: { - nix = throw "don't want to use this"; - }) - ]; - nodes.machine = { ... }: { nix.enable = false; };