mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 22:21:26 +00:00
nixos/tests: fix some evaluation errors
Fixes errors caught by "nixos/testing: restrict arguments to makeTest" as well as some unrelated errors and warnings.
This commit is contained in:
parent
79a234567c
commit
ca8c877f8c
@ -38,7 +38,6 @@ let
|
||||
} // extraConfig);
|
||||
in
|
||||
makeTest {
|
||||
inherit iso;
|
||||
name = "boot-" + name;
|
||||
nodes = { };
|
||||
testScript =
|
||||
|
@ -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 {
|
||||
}
|
||||
'';
|
||||
|
@ -48,7 +48,7 @@ let
|
||||
sudo
|
||||
ceph
|
||||
xfsprogs
|
||||
netcat-openbsd
|
||||
libressl.nc
|
||||
];
|
||||
|
||||
boot.kernelModules = [ "xfs" ];
|
||||
|
@ -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" ''
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@ -50,6 +33,25 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
|
||||
</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,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 = {
|
||||
|
@ -20,7 +20,7 @@ import ./make-test-python.nix (
|
||||
nodes = {
|
||||
|
||||
server =
|
||||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
|
@ -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
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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")
|
||||
|
@ -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" ];
|
||||
|
@ -1,19 +1,14 @@
|
||||
import ./make-test-python.nix ({ lib, ... }: with lib;
|
||||
|
||||
rec {
|
||||
{
|
||||
name = "tor";
|
||||
meta.maintainers = with maintainers; [ joachifm ];
|
||||
|
||||
common =
|
||||
{ ... }:
|
||||
{ boot.kernelParams = [ "audit=0" "apparmor=0" "quiet" ];
|
||||
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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user