nixos/tests: fix some evaluation errors

Fixes errors caught by "nixos/testing: restrict arguments to makeTest" as
well as some unrelated errors and warnings.

-1
nixos/tests/boot.nix
···
} // extraConfig);
in
makeTest {
-
inherit iso;
name = "boot-" + name;
nodes = { };
testScript =
+3 -3
nixos/tests/caddy.nix
···
nodes = {
webserver = { pkgs, lib, ... }: {
services.caddy.enable = true;
-
services.caddy.config = ''
+
services.caddy.extraConfig = ''
http://localhost {
encode gzip
···
'';
specialisation.etag.configuration = {
-
services.caddy.config = lib.mkForce ''
+
services.caddy.extraConfig = lib.mkForce ''
http://localhost {
encode gzip
···
};
specialisation.config-reload.configuration = {
-
services.caddy.config = ''
+
services.caddy.extraConfig = ''
http://localhost:8080 {
}
'';
+1 -1
nixos/tests/ceph-multi-node.nix
···
sudo
ceph
xfsprogs
-
netcat-openbsd
+
libressl.nc
];
boot.kernelModules = [ "xfs" ];
+20 -18
nixos/tests/chromium.nix
···
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" ''
<!DOCTYPE html>
···
</body>
</html>
'';
+
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
+1 -1
nixos/tests/cri-o.nix
···
# 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 = {
+1 -1
nixos/tests/gitolite-fcgiwrap.nix
···
nodes = {
server =
-
{ ... }:
+
{ config, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 ];
+2 -2
nixos/tests/jitsi-meet.nix
···
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
};
};
+3 -3
nixos/tests/misc.nix
···
# 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, ... }:
-6
nixos/tests/rstudio-server.nix
···
};
};
-
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")
+2 -2
nixos/tests/step-ca.nix
···
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" ];
+10 -15
nixos/tests/tor.nix
···
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")
-6
nixos/tests/without-nix.nix
···
maintainers = [ ericson2314 ];
};
-
nixpkgs.overlays = [
-
(self: super: {
-
nix = throw "don't want to use this";
-
})
-
];
-
nodes.machine = { ... }: {
nix.enable = false;
};