nixosTests: handleTest -> runTest, batch 1

Reference: https://github.com/NixOS/nixpkgs/issues/386873
This commit is contained in:
Sizhe Zhao 2025-05-24 23:40:23 +08:00
parent 131462b962
commit f34483be5e
No known key found for this signature in database
GPG key ID: ED1807251A7DA08F
538 changed files with 35525 additions and 36600 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,14 +1,12 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }:
let
let
baud = 57600; baud = 57600;
tty = "/dev/ttyACM0"; tty = "/dev/ttyACM0";
port = "tnc0"; port = "tnc0";
socatPort = 1234; socatPort = 1234;
createAX25Node = nodeId: { createAX25Node = nodeId: {
boot.kernelPackages = pkgs.linuxPackages_ham; boot.kernelPackages = pkgs.linuxPackages_ham;
boot.kernelModules = [ "ax25" ]; boot.kernelModules = [ "ax25" ];
@ -48,8 +46,8 @@ import ./make-test-python.nix (
}; };
}; };
}; };
in in
{ {
name = "ax25Simple"; name = "ax25Simple";
nodes = { nodes = {
node1 = lib.mkMerge [ node1 = lib.mkMerge [
@ -127,5 +125,4 @@ import ./make-test-python.nix (
node2.sleep(1) node2.sleep(1)
node2.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-3 to NOCALL-2 ctl I00\" | grep hello") node2.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-3 to NOCALL-2 ctl I00\" | grep hello")
''; '';
} }
)

View file

@ -1,9 +1,8 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: let
let
user = "alice"; user = "alice";
in in
{ {
name = "benchexec"; name = "benchexec";
nodes.benchexec = { nodes.benchexec = {
@ -60,5 +59,4 @@ import ./make-test-python.nix (
} }
]; ];
}; };
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "bitcoind"; name = "bitcoind";
meta = with pkgs.lib; { meta = with pkgs.lib; {
maintainers = with maintainers; [ _1000101 ]; maintainers = with maintainers; [ _1000101 ];
@ -53,5 +52,4 @@ import ./make-test-python.nix (
'curl --fail --user rpc2:rpc2 --data-binary \'{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }\' -H \'content-type: text/plain;\' localhost:18332 | grep \'"chain":"test"\' ' 'curl --fail --user rpc2:rpc2 --data-binary \'{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }\' -H \'content-type: text/plain;\' localhost:18332 | grep \'"chain":"test"\' '
) )
''; '';
} }
)

View file

@ -6,10 +6,9 @@
# which only works if the first client successfully uses the UPnP-IGD # which only works if the first client successfully uses the UPnP-IGD
# protocol to poke a hole in the NAT. # protocol to poke a hole in the NAT.
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
# Some random file to serve. # Some random file to serve.
file = pkgs.hello.src; file = pkgs.hello.src;
@ -34,9 +33,9 @@ import ./make-test-python.nix (
}; };
}; };
}; };
in in
{ {
name = "bittorrent"; name = "bittorrent";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ maintainers = [
@ -200,5 +199,4 @@ import ./make-test-python.nix (
"cmp ${download-dir}/test.tar.bz2 ${file}" "cmp ${download-dir}/test.tar.bz2 ${file}"
) )
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "blockbook-frontend"; name = "blockbook-frontend";
meta = with pkgs.lib; { meta = with pkgs.lib; {
maintainers = with maintainers; [ _1000101 ]; maintainers = with maintainers; [ _1000101 ];
@ -29,5 +28,4 @@ import ./make-test-python.nix (
machine.succeed("curl -sSfL http://localhost:9030 | grep 'Blockbook'") machine.succeed("curl -sSfL http://localhost:9030 | grep 'Blockbook'")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "boot-stage1"; name = "boot-stage1";
nodes.machine = nodes.machine =
@ -189,5 +188,4 @@ import ./make-test-python.nix (
''; '';
meta.maintainers = with pkgs.lib.maintainers; [ aszlig ]; meta.maintainers = with pkgs.lib.maintainers; [ aszlig ];
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "boot-stage2"; name = "boot-stage2";
nodes.machine = nodes.machine =
@ -69,5 +68,4 @@ import ./make-test-python.nix (
''; '';
meta.maintainers = with pkgs.lib.maintainers; [ numinit ]; meta.maintainers = with pkgs.lib.maintainers; [ numinit ];
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
passphrase = "supersecret"; passphrase = "supersecret";
dataDir = "/ran:dom/data"; dataDir = "/ran:dom/data";
subDir = "not_anything_here"; subDir = "not_anything_here";
@ -39,8 +38,8 @@ import ./make-test-python.nix (
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFpxm7PUQsZB2Ejs8Xp0YVp8IOW+HylIRzhweORbRCMv root@client ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFpxm7PUQsZB2Ejs8Xp0YVp8IOW+HylIRzhweORbRCMv root@client
''; '';
in in
{ {
name = "borgbackup"; name = "borgbackup";
meta = with pkgs.lib; { meta = with pkgs.lib; {
maintainers = with maintainers; [ dotlambda ]; maintainers = with maintainers; [ dotlambda ];
@ -272,5 +271,4 @@ import ./make-test-python.nix (
client.wait_until_succeeds("systemd-inhibit --list | grep -q borgbackup") client.wait_until_succeeds("systemd-inhibit --list | grep -q borgbackup")
client.systemctl("stop borgbackup-job-sleepInhibited") client.systemctl("stop borgbackup-job-sleepInhibited")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "borgmatic"; name = "borgmatic";
nodes.machine = nodes.machine =
{ ... }: { ... }:
@ -24,5 +23,4 @@ import ./make-test-python.nix (
machine.succeed("borgmatic rcreate -e none") machine.succeed("borgmatic rcreate -e none")
machine.succeed("borgmatic") machine.succeed("borgmatic")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "bpftune"; name = "bpftune";
@ -21,5 +20,4 @@ import ./make-test-python.nix (
machine.wait_for_console_text("bpftune works") machine.wait_for_console_text("bpftune works")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, ... }:
{ lib, ... }: {
{
name = "breitbandmessung"; name = "breitbandmessung";
meta.maintainers = with lib.maintainers; [ b4dm4n ]; meta.maintainers = with lib.maintainers; [ b4dm4n ];
@ -37,5 +36,4 @@ import ./make-test-python.nix (
machine.wait_for_text("Datenschutz") machine.wait_for_text("Datenschutz")
machine.screenshot("breitbandmessung") machine.screenshot("breitbandmessung")
''; '';
} }
)

View file

@ -1,9 +1,8 @@
# integration tests for brscan5 sane driver # integration tests for brscan5 sane driver
# #
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "brscan5"; name = "brscan5";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ mattchrist ]; maintainers = [ mattchrist ];
@ -49,5 +48,4 @@ import ./make-test-python.nix (
assert """device `brother5:net1;dev0' is a Brother b ADS-1200""" in scanimage assert """device `brother5:net1;dev0' is a Brother b ADS-1200""" in scanimage
assert """device `brother5:net1;dev1' is a Brother a ADS-1200""" in scanimage assert """device `brother5:net1;dev1' is a Brother a ADS-1200""" in scanimage
''; '';
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
privateKey = '' privateKey = ''
-----BEGIN OPENSSH PRIVATE KEY----- -----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
@ -14,8 +13,8 @@ import ./make-test-python.nix (
publicKey = '' publicKey = ''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHHxQHThDpD9/AMWNqQer3Tg9gXMb2lTZMn0pelo8xyv ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHHxQHThDpD9/AMWNqQer3Tg9gXMb2lTZMn0pelo8xyv
''; '';
in in
{ {
name = "btrbk-doas"; name = "btrbk-doas";
meta = with pkgs.lib; { meta = with pkgs.lib; {
maintainers = with maintainers; [ maintainers = with maintainers; [
@ -124,5 +123,4 @@ import ./make-test-python.nix (
main.succeed("echo baz > /mnt/to_backup/bar") main.succeed("echo baz > /mnt/to_backup/bar")
archive.succeed("cat /mnt/*/bar | grep bar") archive.succeed("cat /mnt/*/bar | grep bar")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "btrbk-no-timer"; name = "btrbk-no-timer";
meta.maintainers = with lib.maintainers; [ oxalica ]; meta.maintainers = with lib.maintainers; [ oxalica ];
@ -37,5 +36,4 @@ import ./make-test-python.nix (
machine.start_job("btrbk-local.service") machine.start_job("btrbk-local.service")
machine.wait_until_succeeds("cat /mnt/btrbk/local/*/bar | grep foo") machine.wait_until_succeeds("cat /mnt/btrbk/local/*/bar | grep foo")
''; '';
} }
)

View file

@ -6,9 +6,8 @@
# order-sensitive config format. # order-sensitive config format.
# #
# Issue: https://github.com/NixOS/nixpkgs/issues/195660 # Issue: https://github.com/NixOS/nixpkgs/issues/195660
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "btrbk-section-order"; name = "btrbk-section-order";
meta.maintainers = with lib.maintainers; [ oxalica ]; meta.maintainers = with lib.maintainers; [ oxalica ];
@ -57,5 +56,4 @@ import ./make-test-python.nix (
print("".join(diff)) print("".join(diff))
assert got == expect assert got == expect
''; '';
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
privateKey = '' privateKey = ''
-----BEGIN OPENSSH PRIVATE KEY----- -----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
@ -14,8 +13,8 @@ import ./make-test-python.nix (
publicKey = '' publicKey = ''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHHxQHThDpD9/AMWNqQer3Tg9gXMb2lTZMn0pelo8xyv ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHHxQHThDpD9/AMWNqQer3Tg9gXMb2lTZMn0pelo8xyv
''; '';
in in
{ {
name = "btrbk"; name = "btrbk";
meta = with pkgs.lib; { meta = with pkgs.lib; {
maintainers = with maintainers; [ symphorien ]; maintainers = with maintainers; [ symphorien ];
@ -118,5 +117,4 @@ import ./make-test-python.nix (
main.succeed("echo baz > /mnt/to_backup/bar") main.succeed("echo baz > /mnt/to_backup/bar")
archive.succeed("cat /mnt/*/bar | grep bar") archive.succeed("cat /mnt/*/bar | grep bar")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "budgie"; name = "budgie";
meta.maintainers = lib.teams.budgie.members; meta.maintainers = lib.teams.budgie.members;
@ -100,5 +99,4 @@ import ./make-test-python.nix (
machine.sleep(10) machine.sleep(10)
machine.screenshot("screen") machine.screenshot("screen")
''; '';
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }:
{ {
name = "buildkite-agent"; name = "buildkite-agent";
meta.maintainers = with lib.maintainers; [ flokli ]; meta.maintainers = with lib.maintainers; [ flokli ];
@ -29,5 +28,4 @@ import ./make-test-python.nix (
machine.wait_for_file("/var/lib/buildkite-agent-two/buildkite-agent.cfg") machine.wait_for_file("/var/lib/buildkite-agent-two/buildkite-agent.cfg")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "c2FmZQ"; name = "c2FmZQ";
meta.maintainers = with lib.maintainers; [ hmenke ]; meta.maintainers = with lib.maintainers; [ hmenke ];
@ -83,5 +82,4 @@ import ./make-test-python.nix (
with subtest("A setting with false value is properly passed"): with subtest("A setting with false value is properly passed"):
machine.succeed("systemctl show -p ExecStart --value c2fmzq-server.service | grep -F -- '--licenses=false'"); machine.succeed("systemctl show -p ExecStart --value c2fmzq-server.service | grep -F -- '--licenses=false'");
''; '';
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
{ {
name = "cage"; name = "cage";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ matthewbauer ]; maintainers = [ matthewbauer ];
@ -40,5 +39,4 @@ import ./make-test-python.nix (
machine.wait_for_text("alice@machine") machine.wait_for_text("alice@machine")
machine.screenshot("screen") machine.screenshot("screen")
''; '';
} }
)

View file

@ -1,14 +1,13 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }:
let let
cagebreakConfigfile = pkgs.writeText "config" '' cagebreakConfigfile = pkgs.writeText "config" ''
workspaces 1 workspaces 1
escape C-t escape C-t
bind t exec env DISPLAY=:0 ${pkgs.xterm}/bin/xterm -cm -pc bind t exec env DISPLAY=:0 ${pkgs.xterm}/bin/xterm -cm -pc
''; '';
in in
{ {
name = "cagebreak"; name = "cagebreak";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ berbiche ]; maintainers = [ berbiche ];
@ -68,5 +67,4 @@ import ./make-test-python.nix (
# machine.screenshot("screen") # machine.screenshot("screen")
# machine.send_key("ctrl-d") # machine.send_key("ctrl-d")
''; '';
} }
)

View file

@ -1,10 +1,9 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: let
let
certs = import ./common/acme/server/snakeoil-certs.nix; certs = import ./common/acme/server/snakeoil-certs.nix;
inherit (certs) domain; inherit (certs) domain;
in in
{ {
name = "canaille"; name = "canaille";
meta.maintainers = with pkgs.lib.maintainers; [ erictapen ]; meta.maintainers = with pkgs.lib.maintainers; [ erictapen ];
@ -58,5 +57,4 @@ import ./make-test-python.nix (
assert json.loads(json_str)[0]["user_name"] == "admin" assert json.loads(json_str)[0]["user_name"] == "admin"
server.succeed("sudo -iu canaille -- canaille config check") server.succeed("sudo -iu canaille -- canaille config check")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "castopod"; name = "castopod";
meta = with lib.maintainers; { meta = with lib.maintainers; {
maintainers = [ alexoundos ]; maintainers = [ alexoundos ];
@ -246,5 +245,4 @@ import ./make-test-python.nix (
client.succeed(\ client.succeed(\
"PYTHONUNBUFFERED=1 systemd-cat -t browser-test browser-test") "PYTHONUNBUFFERED=1 systemd-cat -t browser-test browser-test")
''; '';
} }
)

View file

@ -1,8 +1,7 @@
# This test checks charliecloud image construction and run # This test checks charliecloud image construction and run
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: let
let
dockerfile = pkgs.writeText "Dockerfile" '' dockerfile = pkgs.writeText "Dockerfile" ''
FROM nix FROM nix
@ -11,8 +10,8 @@ import ./make-test-python.nix (
CMD ["true"] CMD ["true"]
''; '';
in in
{ {
name = "charliecloud"; name = "charliecloud";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ bzizou ]; maintainers = [ bzizou ];
@ -45,5 +44,4 @@ import ./make-test-python.nix (
host.succeed('su - alice -c "ch-tar2dir /var/tmp/hello.tar.gz /var/tmp"') host.succeed('su - alice -c "ch-tar2dir /var/tmp/hello.tar.gz /var/tmp"')
host.succeed('su - alice -c "ch-run /var/tmp/hello -- echo Running_From_Container_OK"') host.succeed('su - alice -c "ch-run /var/tmp/hello -- echo Running_From_Container_OK"')
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "cinnamon-wayland"; name = "cinnamon-wayland";
meta.maintainers = lib.teams.cinnamon.members; meta.maintainers = lib.teams.cinnamon.members;
@ -80,5 +79,4 @@ import ./make-test-python.nix (
with subtest("Check if Cinnamon has ever coredumped"): with subtest("Check if Cinnamon has ever coredumped"):
machine.fail("coredumpctl --json=short | grep -E 'cinnamon|nemo'") machine.fail("coredumpctl --json=short | grep -E 'cinnamon|nemo'")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "cinnamon"; name = "cinnamon";
meta.maintainers = lib.teams.cinnamon.members; meta.maintainers = lib.teams.cinnamon.members;
@ -100,5 +99,4 @@ import ./make-test-python.nix (
with subtest("Check if Cinnamon has ever coredumped"): with subtest("Check if Cinnamon has ever coredumped"):
machine.fail("coredumpctl --json=short | grep -E 'cinnamon|nemo'") machine.fail("coredumpctl --json=short | grep -E 'cinnamon|nemo'")
''; '';
} }
)

View file

@ -18,9 +18,8 @@ let
in in
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "cjdns"; name = "cjdns";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ ehmry ]; maintainers = [ ehmry ];
@ -130,5 +129,4 @@ import ./make-test-python.nix (
bob.succeed("curl --fail -g http://[{}]".format(alice_ip6)) bob.succeed("curl --fail -g http://[{}]".format(alice_ip6))
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "clickhouse"; name = "clickhouse";
meta.maintainers = with pkgs.lib.maintainers; [ ]; meta.maintainers = with pkgs.lib.maintainers; [ ];
@ -31,5 +30,4 @@ import ./make-test-python.nix (
"cat ${selectQuery} | clickhouse-client | grep foo" "cat ${selectQuery} | clickhouse-client | grep foo"
) )
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "cloudlog"; name = "cloudlog";
meta = { meta = {
maintainers = with pkgs.lib.maintainers; [ melling ]; maintainers = with pkgs.lib.maintainers; [ melling ];
@ -17,5 +16,4 @@ import ./make-test-python.nix (
machine.wait_for_open_port(80); machine.wait_for_open_port(80);
machine.wait_until_succeeds("curl -s -L --fail http://localhost | grep 'Login - Cloudlog'") machine.wait_until_succeeds("curl -s -L --fail http://localhost | grep 'Login - Cloudlog'")
''; '';
} }
)

View file

@ -1,11 +1,10 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }:
let let
user = "alice"; # from ./common/user-account.nix user = "alice"; # from ./common/user-account.nix
password = "foobar"; # from ./common/user-account.nix password = "foobar"; # from ./common/user-account.nix
in in
{ {
name = "cockpit"; name = "cockpit";
meta = { meta = {
maintainers = with lib.maintainers; [ lucasew ]; maintainers = with lib.maintainers; [ lucasew ];
@ -152,5 +151,4 @@ import ./make-test-python.nix (
print(client.succeed("whoami")) print(client.succeed("whoami"))
client.succeed('PYTHONUNBUFFERED=1 selenium-script') client.succeed('PYTHONUNBUFFERED=1 selenium-script')
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "code-server"; name = "code-server";
nodes = { nodes = {
@ -22,5 +21,4 @@ import ./make-test-python.nix (
''; '';
meta.maintainers = [ lib.maintainers.drupol ]; meta.maintainers = [ lib.maintainers.drupol ];
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "coder"; name = "coder";
meta.maintainers = pkgs.coder.meta.maintainers; meta.maintainers = pkgs.coder.meta.maintainers;
@ -21,5 +20,4 @@ import ./make-test-python.nix (
machine.succeed("curl --fail http://localhost:3000") machine.succeed("curl --fail http://localhost:3000")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "collectd"; name = "collectd";
meta = { }; meta = { };
@ -37,5 +36,4 @@ import ./make-test-python.nix (
machine.succeed(f"cp {file} before") machine.succeed(f"cp {file} before")
machine.wait_until_fails(f"cmp before {file}") machine.wait_until_fails(f"cmp before {file}")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, ... }:
{ lib, ... }: {
{
name = "commafeed"; name = "commafeed";
nodes.server = { nodes.server = {
@ -17,5 +16,4 @@ import ./make-test-python.nix (
''; '';
meta.maintainers = [ lib.maintainers.raroh73 ]; meta.maintainers = [ lib.maintainers.raroh73 ];
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "connman"; name = "connman";
meta = with lib.maintainers; { meta = with lib.maintainers; {
maintainers = [ rnhmjoj ]; maintainers = [ rnhmjoj ];
@ -81,5 +80,4 @@ import ./make-test-python.nix (
client.wait_until_succeeds("connmanctl tether wifi on nixos-test reproducibility | grep -q 'Enabled'") client.wait_until_succeeds("connmanctl tether wifi on nixos-test reproducibility | grep -q 'Enabled'")
client.wait_until_succeeds("iw wlan0 info | grep -q nixos-test") client.wait_until_succeeds("iw wlan0 info | grep -q nixos-test")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { ... }:
{ ... }: {
{
name = "consul-template"; name = "consul-template";
nodes.machine = nodes.machine =
@ -39,5 +38,4 @@ import ./make-test-python.nix (
machine.wait_for_file("/example") machine.wait_for_file("/example")
machine.succeed('grep "example" /example') machine.succeed('grep "example" /example')
''; '';
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }:
let let
# Settings for both servers and agents # Settings for both servers and agents
webUi = true; webUi = true;
retry_interval = "1s"; retry_interval = "1s";
@ -114,8 +113,8 @@ import ./make-test-python.nix (
}; };
}; };
}; };
in in
{ {
name = "consul"; name = "consul";
nodes = { nodes = {
@ -263,5 +262,4 @@ import ./make-test-python.nix (
print("rolling_restart_test(proper_rolling_procedure=False)") print("rolling_restart_test(proper_rolling_procedure=False)")
rolling_restart_test(proper_rolling_procedure=False) rolling_restart_test(proper_rolling_procedure=False)
''; '';
} }
)

View file

@ -5,9 +5,8 @@ let
containerIp6 = "fc00::2/7"; containerIp6 = "fc00::2/7";
in in
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-bridge"; name = "containers-bridge";
meta = { meta = {
maintainers = with lib.maintainers; [ maintainers = with lib.maintainers; [
@ -110,5 +109,4 @@ import ./make-test-python.nix (
# Destroying a declarative container should fail. # Destroying a declarative container should fail.
machine.fail("nixos-container destroy webserver") machine.fail("nixos-container destroy webserver")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: let
let
customPkgs = pkgs.appendOverlays [ customPkgs = pkgs.appendOverlays [
(self: super: { (self: super: {
@ -10,8 +9,8 @@ import ./make-test-python.nix (
}) })
]; ];
in in
{ {
name = "containers-custom-pkgs"; name = "containers-custom-pkgs";
meta = { meta = {
maintainers = with lib.maintainers; [ erikarvstedt ]; maintainers = with lib.maintainers; [ erikarvstedt ];
@ -44,5 +43,4 @@ import ./make-test-python.nix (
# This test only consists of evaluating the test machine # This test only consists of evaluating the test machine
testScript = "pass"; testScript = "pass";
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-ephemeral"; name = "containers-ephemeral";
meta = { meta = {
maintainers = with lib.maintainers; [ patryk27 ]; maintainers = with lib.maintainers; [ patryk27 ];
@ -55,5 +54,4 @@ import ./make-test-python.nix (
with subtest("Container's root folder was removed"): with subtest("Container's root folder was removed"):
machine.fail("ls /run/nixos-containers/webserver") machine.fail("ls /run/nixos-containers/webserver")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-extra_veth"; name = "containers-extra_veth";
meta = { meta = {
maintainers = with lib.maintainers; [ kampfschlaefer ]; maintainers = with lib.maintainers; [ kampfschlaefer ];
@ -111,5 +110,4 @@ import ./make-test-python.nix (
with subtest("Destroying a declarative container should fail"): with subtest("Destroying a declarative container should fail"):
machine.fail("nixos-container destroy webserver") machine.fail("nixos-container destroy webserver")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-hosts"; name = "containers-hosts";
meta = { meta = {
maintainers = with lib.maintainers; [ montag451 ]; maintainers = with lib.maintainers; [ montag451 ];
@ -51,5 +50,4 @@ import ./make-test-python.nix (
for host in "simple.containers", "netmask.containers": for host in "simple.containers", "netmask.containers":
machine.succeed(f"ping -n -c 1 {host}") machine.succeed(f"ping -n -c 1 {host}")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-imperative"; name = "containers-imperative";
meta = { meta = {
maintainers = with lib.maintainers; [ maintainers = with lib.maintainers; [
@ -193,5 +192,4 @@ import ./make-test-python.nix (
) )
machine.succeed("test ! -e /var/lib/nixos-containers/b0rk") machine.succeed("test ! -e /var/lib/nixos-containers/b0rk")
''; '';
} }
)

View file

@ -12,9 +12,8 @@ let
}; };
in in
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-ipv4-ipv6"; name = "containers-ipv4-ipv6";
meta = { meta = {
maintainers = with lib.maintainers; [ maintainers = with lib.maintainers; [
@ -78,5 +77,4 @@ import ./make-test-python.nix (
# Destroying a declarative container should fail. # Destroying a declarative container should fail.
machine.fail(f"nixos-container destroy {container}") machine.fail(f"nixos-container destroy {container}")
''; '';
} }
)

View file

@ -4,9 +4,8 @@ let
containerIp2 = "192.168.1.254"; containerIp2 = "192.168.1.254";
in in
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-macvlans"; name = "containers-macvlans";
meta = { meta = {
maintainers = with lib.maintainers; [ montag451 ]; maintainers = with lib.maintainers; [ montag451 ];
@ -96,5 +95,4 @@ import ./make-test-python.nix (
machine2.succeed("ping -n -c 1 ${containerIp1}") machine2.succeed("ping -n -c 1 ${containerIp1}")
machine2.succeed("ping -n -c 1 ${containerIp2}") machine2.succeed("ping -n -c 1 ${containerIp2}")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-names"; name = "containers-names";
meta = { meta = {
maintainers = with lib.maintainers; [ patryk27 ]; maintainers = with lib.maintainers; [ patryk27 ];
@ -40,5 +39,4 @@ import ./make-test-python.nix (
machine.succeed("ip link show | grep ve-really-lFYWO") machine.succeed("ip link show | grep ve-really-lFYWO")
machine.succeed("ip link show | grep ve-really-l3QgY") machine.succeed("ip link show | grep ve-really-l3QgY")
''; '';
} }
)

View file

@ -1,8 +1,7 @@
# Test for NixOS' container nesting. # Test for NixOS' container nesting.
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "nested"; name = "nested";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
@ -32,5 +31,4 @@ import ./make-test-python.nix (
) )
) )
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-physical_interfaces"; name = "containers-physical_interfaces";
meta = { meta = {
maintainers = with lib.maintainers; [ kampfschlaefer ]; maintainers = with lib.maintainers; [ kampfschlaefer ];
@ -149,5 +148,4 @@ import ./make-test-python.nix (
"nixos-container run bridgedbond -- ping -w 10 -c 1 -n 10.10.0.1", "nixos-container run bridgedbond -- ping -w 10 -c 1 -n 10.10.0.1",
) )
''; '';
} }
)

View file

@ -5,9 +5,8 @@ let
containerPort = 80; containerPort = 80;
in in
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-portforward"; name = "containers-portforward";
meta = { meta = {
maintainers = with lib.maintainers; [ maintainers = with lib.maintainers; [
@ -69,5 +68,4 @@ import ./make-test-python.nix (
machine.fail("nixos-container destroy webserver") machine.fail("nixos-container destroy webserver")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-reloadable"; name = "containers-reloadable";
meta = { meta = {
maintainers = with lib.maintainers; [ danbst ]; maintainers = with lib.maintainers; [ danbst ];
@ -57,5 +56,4 @@ import ./make-test-python.nix (
machine.fail("systemctl status httpd -M test1 >&2") machine.fail("systemctl status httpd -M test1 >&2")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, ... }:
{ lib, ... }: {
{
name = "containers-require-bind-mounts"; name = "containers-require-bind-mounts";
meta.maintainers = with lib.maintainers; [ kira-bruneau ]; meta.maintainers = with lib.maintainers; [ kira-bruneau ];
@ -36,5 +35,4 @@ import ./make-test-python.nix (
assert "down" in machine.succeed("nixos-container status require-bind-mounts") assert "down" in machine.succeed("nixos-container status require-bind-mounts")
assert "inactive" in machine.fail("systemctl is-active srv-data.mount") assert "inactive" in machine.fail("systemctl is-active srv-data.mount")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-restart_networking"; name = "containers-restart_networking";
meta = { meta = {
maintainers = with lib.maintainers; [ kampfschlaefer ]; maintainers = with lib.maintainers; [ kampfschlaefer ];
@ -127,5 +126,4 @@ import ./make-test-python.nix (
client.fail("grep eth1 /run/br0.interfaces >&2") client.fail("grep eth1 /run/br0.interfaces >&2")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-tmpfs"; name = "containers-tmpfs";
meta = { meta = {
maintainers = with lib.maintainers; [ patryk27 ]; maintainers = with lib.maintainers; [ patryk27 ];
@ -89,5 +88,4 @@ import ./make-test-python.nix (
) )
machine.fail(tmpfs_cmd("ls -l /var | grep -q test.file")) machine.fail(tmpfs_cmd("ls -l /var | grep -q test.file"))
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "containers-unified-hierarchy"; name = "containers-unified-hierarchy";
meta = { meta = {
maintainers = with lib.maintainers; [ farnoy ]; maintainers = with lib.maintainers; [ farnoy ];
@ -22,5 +21,4 @@ import ./make-test-python.nix (
machine.succeed("echo 'stat -fc %T /sys/fs/cgroup/ | grep cgroup2fs' | nixos-container root-login test-container") machine.succeed("echo 'stat -fc %T /sys/fs/cgroup/ | grep cgroup2fs' | nixos-container root-login test-container")
''; '';
} }
)

View file

@ -1,10 +1,9 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }:
let let
port = 3333; port = 3333;
in in
{ {
name = "convos"; name = "convos";
meta.maintainers = with lib.maintainers; [ sgo ]; meta.maintainers = with lib.maintainers; [ sgo ];
@ -24,5 +23,4 @@ import ./make-test-python.nix (
machine.wait_for_open_port(${toString port}) machine.wait_for_open_port(${toString port})
machine.succeed("curl -f http://localhost:${toString port}/") machine.succeed("curl -f http://localhost:${toString port}/")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "coturn"; name = "coturn";
nodes = { nodes = {
default = { default = {
@ -34,5 +33,4 @@ import ./make-test-python.nix (
default.log(default.execute("systemd-analyze security coturn.service | grep -v ''")[1]) default.log(default.execute("systemd-analyze security coturn.service | grep -v ''")[1])
''; '';
} }
)

View file

@ -14,9 +14,8 @@ let
testpass = "cowabunga"; testpass = "cowabunga";
testlogin = "${testuser}:${testpass}@"; testlogin = "${testuser}:${testpass}@";
in in
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "couchdb"; name = "couchdb";
meta.maintainers = [ ]; meta.maintainers = [ ];
@ -60,5 +59,4 @@ import ./make-test-python.nix (
"${curlJqCheck testlogin "GET" "_node/couchdb@127.0.0.1" ".couchdb" "Welcome"}" "${curlJqCheck testlogin "GET" "_node/couchdb@127.0.0.1" ".couchdb" "Welcome"}"
) )
''; '';
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }:
{ {
name = "crabfit"; name = "crabfit";
meta.maintainers = [ ]; meta.maintainers = [ ];
@ -29,5 +28,4 @@ import ./make-test-python.nix (
machine.succeed("curl -f http://localhost:3001/") machine.succeed("curl -f http://localhost:3001/")
''; '';
} }
)

View file

@ -1,14 +1,13 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: let
let
client = client =
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = [ pkgs.croc ]; environment.systemPackages = [ pkgs.croc ];
}; };
pass = "PassRelay"; pass = "PassRelay";
in in
{ {
name = "croc"; name = "croc";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ maintainers = [
@ -55,5 +54,4 @@ import ./make-test-python.nix (
assert "Hello World" in receiver.succeed("cat testfile01.txt") assert "Hello World" in receiver.succeed("cat testfile01.txt")
assert "Hello Earth" in receiver.succeed("cat testfile02.txt") assert "Hello Earth" in receiver.succeed("cat testfile02.txt")
''; '';
} }
)

View file

@ -24,9 +24,8 @@
uses upstream for its tests. uses upstream for its tests.
*/ */
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: let
let
# Update with domains in TestImpersonate.TEST_URLS if needed from: # Update with domains in TestImpersonate.TEST_URLS if needed from:
# https://github.com/lwthiker/curl-impersonate/blob/main/tests/test_impersonate.py # https://github.com/lwthiker/curl-impersonate/blob/main/tests/test_impersonate.py
domains = [ domains = [
@ -130,8 +129,8 @@ import ./make-test-python.nix (
cd tests cd tests
pytest . --install-dir ../usr --capture-interface eth1 --exitfirst -k 'not test_http2_headers' pytest . --install-dir ../usr --capture-interface eth1 --exitfirst -k 'not test_http2_headers'
''; '';
in in
{ {
name = "curl-impersonate"; name = "curl-impersonate";
meta = with lib.maintainers; { meta = with lib.maintainers; {
@ -201,5 +200,4 @@ import ./make-test-python.nix (
with subtest("Run curl-impersonate tests"): with subtest("Run curl-impersonate tests"):
curl.succeed("${curl-impersonate-test}") curl.succeed("${curl-impersonate-test}")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "dae"; name = "dae";
@ -34,5 +33,4 @@ import ./make-test-python.nix (
machine.succeed("curl --fail --max-time 10 http://localhost") machine.succeed("curl --fail --max-time 10 http://localhost")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "db-rest"; name = "db-rest";
meta.maintainers = with pkgs.lib.maintainers; [ marie ]; meta.maintainers = with pkgs.lib.maintainers; [ marie ];
@ -121,5 +120,4 @@ import ./make-test-python.nix (
client.succeed("curl --fail --get http://192.168.2.12:3000/stations --data-urlencode 'query=Köln Hbf' | jq -r '.\"8000207\".name' | grep 'Köln Hbf'") client.succeed("curl --fail --get http://192.168.2.12:3000/stations --data-urlencode 'query=Köln Hbf' | jq -r '.\"8000207\".name' | grep 'Köln Hbf'")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, ... }:
{ lib, ... }: {
{
name = "dconf"; name = "dconf";
meta.maintainers = with lib.maintainers; [ meta.maintainers = with lib.maintainers; [
@ -40,5 +39,4 @@ import ./make-test-python.nix (
machine.fail("sudo -u alice dbus-run-session -- dconf write /test/is/locked \"@s 'unlocked'\"") machine.fail("sudo -u alice dbus-run-session -- dconf write /test/is/locked \"@s 'unlocked'\"")
machine.succeed("sudo -u alice dbus-run-session -- dconf write /test/not/locked \"@i 2\"") machine.succeed("sudo -u alice dbus-run-session -- dconf write /test/not/locked \"@i 2\"")
''; '';
} }
)

View file

@ -1,9 +1,8 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: let
let
port = 6000; port = 6000;
in in
{ {
name = "ddns-updater"; name = "ddns-updater";
meta.maintainers = with lib.maintainers; [ delliott ]; meta.maintainers = with lib.maintainers; [ delliott ];
@ -24,5 +23,4 @@ import ./make-test-python.nix (
machine.wait_for_open_port(${toString port}) machine.wait_for_open_port(${toString port})
machine.succeed("curl --fail http://localhost:${toString port}/") machine.succeed("curl --fail http://localhost:${toString port}/")
''; '';
} }
)

View file

@ -1,9 +1,8 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: let
let
httpPort = 800; httpPort = 800;
in in
{ {
name = "deconz"; name = "deconz";
meta.maintainers = with lib.maintainers; [ meta.maintainers = with lib.maintainers; [
@ -33,5 +32,4 @@ import ./make-test-python.nix (
machine.wait_for_unit("deconz.service") machine.wait_for_unit("deconz.service")
machine.succeed("curl -sfL http://localhost:${toString httpPort}") machine.succeed("curl -sfL http://localhost:${toString httpPort}")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "deepin"; name = "deepin";
meta.maintainers = lib.teams.deepin.members; meta.maintainers = lib.teams.deepin.members;
@ -53,5 +52,4 @@ import ./make-test-python.nix (
machine.sleep(20) machine.sleep(20)
machine.screenshot("screen") machine.screenshot("screen")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "deluge"; name = "deluge";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ flokli ]; maintainers = [ flokli ];
@ -65,5 +64,4 @@ import ./make-test-python.nix (
"(deluge-console 'connect 127.0.0.1:58846 andrew password; help' || true) | grep -q 'rm.*Remove a torrent'" "(deluge-console 'connect 127.0.0.1:58846 andrew password; help' || true) | grep -q 'rm.*Remove a torrent'"
) )
''; '';
} }
)

View file

@ -1,9 +1,8 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: let
let
dependencyTrackPort = 8081; dependencyTrackPort = 8081;
in in
{ {
name = "dependency-track"; name = "dependency-track";
meta = { meta = {
maintainers = pkgs.lib.teams.cyberus.members; maintainers = pkgs.lib.teams.cyberus.members;
@ -67,5 +66,4 @@ import ./make-test-python.nix (
with subtest("nginx serves frontend"): with subtest("nginx serves frontend"):
server.succeed("curl http://localhost/ | grep \"<title>Dependency-Track</title>\"") server.succeed("curl http://localhost/ | grep \"<title>Dependency-Track</title>\"")
''; '';
} }
)

View file

@ -1,9 +1,8 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: let
let
server-port = 3141; server-port = 3141;
in in
{ {
name = "devpi-server"; name = "devpi-server";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ cafkafk ]; maintainers = [ cafkafk ];
@ -39,5 +38,4 @@ import ./make-test-python.nix (
client1.succeed("devpi getjson http://devpi:${builtins.toString server-port}") client1.succeed("devpi getjson http://devpi:${builtins.toString server-port}")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, ... }:
{ lib, ... }: {
{
name = "dex-oidc"; name = "dex-oidc";
meta.maintainers = with lib.maintainers; [ Flakebi ]; meta.maintainers = with lib.maintainers; [ Flakebi ];
@ -80,5 +79,4 @@ import ./make-test-python.nix (
f"curl -fs localhost:8080/dex/userinfo --oauth2-bearer {bearer}" f"curl -fs localhost:8080/dex/userinfo --oauth2-bearer {bearer}"
) )
''; '';
} }
)

View file

@ -1,11 +1,10 @@
import ./make-test-python.nix ( {
{
pkgs, pkgs,
latestKernel ? false, latestKernel ? false,
... ...
}: }:
{ {
name = "disable-installer-tools"; name = "disable-installer-tools";
nodes.machine = nodes.machine =
@ -31,5 +30,4 @@ import ./make-test-python.nix (
with subtest("perl should not be included"): with subtest("perl should not be included"):
machine.fail("which perl") machine.fail("which perl")
''; '';
} }
)

View file

@ -3,14 +3,13 @@
# 2. sending a private message to the admin user through the API # 2. sending a private message to the admin user through the API
# 3. replying to that message via email. # 3. replying to that message via email.
import ./make-test-python.nix ( {
{
pkgs, pkgs,
lib, lib,
package ? pkgs.discourse, package ? pkgs.discourse,
... ...
}: }:
let let
certs = import ./common/acme/server/snakeoil-certs.nix; certs = import ./common/acme/server/snakeoil-certs.nix;
clientDomain = "client.fake.domain"; clientDomain = "client.fake.domain";
discourseDomain = certs.domain; discourseDomain = certs.domain;
@ -22,8 +21,8 @@ import ./make-test-python.nix (
fullName = "Alice Admin"; fullName = "Alice Admin";
passwordFile = "${pkgs.writeText "admin-pass" adminPassword}"; passwordFile = "${pkgs.writeText "admin-pass" adminPassword}";
}; };
in in
{ {
name = "discourse"; name = "discourse";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ talyz ]; maintainers = [ talyz ];
@ -207,5 +206,4 @@ import ./make-test-python.nix (
'curl -sS -f https://${discourseDomain}/t/$(<topic_id) -H "Accept: application/json" -H "Api-Key: $(<api_key)" -H "Api-Username: system" | jq -e \'if .post_stream.posts[1].cooked == "<p>Test reply.</p>" then true else null end\' ' 'curl -sS -f https://${discourseDomain}/t/$(<topic_id) -H "Accept: application/json" -H "Api-Key: $(<api_key)" -H "Api-Username: system" | jq -e \'if .post_stream.posts[1].cooked == "<p>Test reply.</p>" then true else null end\' '
) )
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "documize"; name = "documize";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ ]; maintainers = [ ];
@ -63,5 +62,4 @@ import ./make-test-python.nix (
'test "$(curl -f localhost:3000/api/public/meta | jq ".title" | xargs echo)" = "NixOS"' 'test "$(curl -f localhost:3000/api/public/meta | jq ".title" | xargs echo)" = "NixOS"'
) )
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "doh-proxy-rust"; name = "doh-proxy-rust";
meta.maintainers = with lib.maintainers; [ stephank ]; meta.maintainers = with lib.maintainers; [ stephank ];
@ -44,5 +43,4 @@ import ./make-test-python.nix (
machine.wait_for_open_port(3000) machine.wait_for_open_port(3000)
machine.succeed(f"curl --fail -H 'Accept: application/dns-message' '{url}?dns={query}' | grep -F {bin_ip}") machine.succeed(f"curl --fail -H 'Accept: application/dns-message' '{url}?dns={query}' | grep -F {bin_ip}")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "domination"; name = "domination";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ fgaz ]; maintainers = [ fgaz ];
@ -29,5 +28,4 @@ import ./make-test-python.nix (
machine.wait_for_text(r"(New Game|Start Server|Load Game|Help Manual|Join Game|About|Play Online)") machine.wait_for_text(r"(New Game|Start Server|Load Game|Help Manual|Join Game|About|Play Online)")
machine.screenshot("screen") machine.screenshot("screen")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "drbd-driver"; name = "drbd-driver";
meta.maintainers = with pkgs.lib.maintainers; [ birkb ]; meta.maintainers = with pkgs.lib.maintainers; [ birkb ];
@ -20,5 +19,4 @@ import ./make-test-python.nix (
machine.start(); machine.start();
machine.succeed("modinfo drbd | grep --extended-regexp '^version:\s+${pkgs.linuxPackages.drbd.version}$'") machine.succeed("modinfo drbd | grep --extended-regexp '^version:\s+${pkgs.linuxPackages.drbd.version}$'")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: let
let
drbdPort = 7789; drbdPort = 7789;
drbdConfig = drbdConfig =
@ -41,8 +40,8 @@ import ./make-test-python.nix (
''; '';
}; };
}; };
in in
{ {
name = "drbd"; name = "drbd";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ maintainers = [
@ -89,5 +88,4 @@ import ./make-test-python.nix (
"ls /mnt/drbd/hello", "ls /mnt/drbd/hello",
) )
''; '';
} }
)

View file

@ -3,9 +3,8 @@
# client on the inside network, a server on the outside network, and a # client on the inside network, a server on the outside network, and a
# router connected to both that performs Network Address Translation # router connected to both that performs Network Address Translation
# for the client. # for the client.
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: let
let
routerBase = lib.mkMerge [ routerBase = lib.mkMerge [
{ {
virtualisation.vlans = [ virtualisation.vlans = [
@ -17,8 +16,8 @@ import ./make-test-python.nix (
networking.nat.externalInterface = "eth1"; networking.nat.externalInterface = "eth1";
} }
]; ];
in in
{ {
name = "dublin-traceroute"; name = "dublin-traceroute";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ baloo ]; maintainers = [ baloo ];
@ -73,5 +72,4 @@ import ./make-test-python.nix (
# Make sure we can trace from an unprivileged user # Make sure we can trace from an unprivileged user
client.succeed("sudo -u alice dublin-traceroute server") client.succeed("sudo -u alice dublin-traceroute server")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { ... }:
{ ... }: {
{
name = "ecryptfs"; name = "ecryptfs";
nodes.machine = nodes.machine =
@ -85,5 +84,4 @@ import ./make-test-python.nix (
logout() logout()
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "endlessh-go"; name = "endlessh-go";
meta.maintainers = with lib.maintainers; [ azahi ]; meta.maintainers = with lib.maintainers; [ azahi ];
@ -67,5 +66,4 @@ import ./make-test-python.nix (
server.succeed("curl -sSf server:92/metrics | grep -q endlessh_client_closed_count_total") server.succeed("curl -sSf server:92/metrics | grep -q endlessh_client_closed_count_total")
client.fail("curl -sSfm 5 server:92/metrics") client.fail("curl -sSfm 5 server:92/metrics")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "endlessh"; name = "endlessh";
meta.maintainers = with lib.maintainers; [ azahi ]; meta.maintainers = with lib.maintainers; [ azahi ];
@ -48,5 +47,4 @@ import ./make-test-python.nix (
server.wait_for_open_port(22) server.wait_for_open_port(22)
client.succeed("nc -dvW5 server 22") client.succeed("nc -dvW5 server 22")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "engelsystem"; name = "engelsystem";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ talyz ]; maintainers = [ talyz ];
@ -41,5 +40,4 @@ import ./make-test-python.nix (
"test 'News - Engelsystem' = \"$(xml sel -T -t -c html/head/title news)\"" "test 'News - Engelsystem' = \"$(xml sel -T -t -c html/head/title news)\""
) )
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "enlightenment"; name = "enlightenment";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
@ -100,5 +99,4 @@ import ./make-test-python.nix (
machine.sleep(2) machine.sleep(2)
machine.screenshot("terminology") machine.screenshot("terminology")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "environment"; name = "environment";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ nequissimus ]; maintainers = [ nequissimus ];
@ -45,5 +44,4 @@ import ./make-test-python.nix (
assert "awesome" in machine.succeed("echo ''${NIXCON}") assert "awesome" in machine.succeed("echo ''${NIXCON}")
machine.fail("printenv SHOULD_NOT_BE_SET") machine.fail("printenv SHOULD_NOT_BE_SET")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: let
let
pythonShebang = pkgs.writeScript "python-shebang" '' pythonShebang = pkgs.writeScript "python-shebang" ''
#!/usr/bin/python #!/usr/bin/python
print("OK") print("OK")
@ -10,8 +9,8 @@ import ./make-test-python.nix (
#!/usr/bin/bash #!/usr/bin/bash
echo "OK" echo "OK"
''; '';
in in
{ {
name = "envfs"; name = "envfs";
nodes.machine.services.envfs.enable = true; nodes.machine.services.envfs.enable = true;
@ -38,5 +37,4 @@ import ./make-test-python.nix (
print(out) print(out)
assert out == "OK\n" assert out == "OK\n"
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "ergo"; name = "ergo";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ mmahut ]; maintainers = [ mmahut ];
@ -19,5 +18,4 @@ import ./make-test-python.nix (
start_all() start_all()
machine.wait_for_unit("ergo.service") machine.wait_for_unit("ergo.service")
''; '';
} }
)

View file

@ -9,9 +9,8 @@ let
iiDir = "/tmp/irc"; iiDir = "/tmp/irc";
in in
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "ergochat"; name = "ergochat";
nodes = nodes =
{ {
@ -104,5 +103,4 @@ import ./make-test-python.nix (
# to the next one. # to the next one.
'' ''
+ lib.concatStrings (reduce (lib.zipListsWith (cs: c: cs + c)) (builtins.map clientScript clients)); + lib.concatStrings (reduce (lib.zipListsWith (cs: c: cs + c)) (builtins.map clientScript clients));
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "eris-server"; name = "eris-server";
meta.maintainers = with lib.maintainers; [ ehmry ]; meta.maintainers = with lib.maintainers; [ ehmry ];
@ -25,5 +24,4 @@ import ./make-test-python.nix (
server.wait_for_open_port(80) server.wait_for_open_port(80)
server.succeed("eriscmd get http://[::1] $(echo 'Hail ERIS!' | eriscmd put coap+tcp://[::1]:5683)") server.succeed("eriscmd get http://[::1] $(echo 'Hail ERIS!' | eriscmd put coap+tcp://[::1]:5683)")
''; '';
} }
)

View file

@ -1,11 +1,10 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }:
let let
testPort = 6052; testPort = 6052;
unixSocket = "/run/esphome/esphome.sock"; unixSocket = "/run/esphome/esphome.sock";
in in
{ {
name = "esphome"; name = "esphome";
meta.maintainers = with lib.maintainers; [ oddlama ]; meta.maintainers = with lib.maintainers; [ oddlama ];
@ -40,5 +39,4 @@ import ./make-test-python.nix (
esphomeUnix.wait_for_file("${unixSocket}") esphomeUnix.wait_for_file("${unixSocket}")
esphomeUnix.succeed("curl --fail --unix-socket ${unixSocket} http://localhost/") esphomeUnix.succeed("curl --fail --unix-socket ${unixSocket} http://localhost/")
''; '';
} }
)

View file

@ -1,11 +1,10 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
dataDir = "/var/lib/foobar"; dataDir = "/var/lib/foobar";
in in
{ {
name = "etebase-server"; name = "etebase-server";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ felschr ]; maintainers = [ felschr ];
@ -48,5 +47,4 @@ import ./make-test-python.nix (
"etebase-server createsuperuser --no-input --username admin --email root@localhost" "etebase-server createsuperuser --no-input --username admin --email root@localhost"
) )
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "etesync-dav"; name = "etesync-dav";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
@ -24,5 +23,4 @@ import ./make-test-python.nix (
with subtest("Check that the web interface is accessible"): with subtest("Check that the web interface is accessible"):
assert "Add User" in machine.succeed("curl -s http://localhost:37358/.web/add/") assert "Add User" in machine.succeed("curl -s http://localhost:37358/.web/add/")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "fakeroute"; name = "fakeroute";
meta.maintainers = with lib.maintainers; [ rnhmjoj ]; meta.maintainers = with lib.maintainers; [ rnhmjoj ];
@ -23,5 +22,4 @@ import ./make-test-python.nix (
machine.wait_for_unit("fakeroute.service") machine.wait_for_unit("fakeroute.service")
machine.succeed("traceroute 127.0.0.1 | grep -q 216.102.187.130") machine.succeed("traceroute 127.0.0.1 | grep -q 216.102.187.130")
''; '';
} }
)

View file

@ -3,9 +3,8 @@
config ? { }, config ? { },
pkgs ? import ../.. { inherit system config; }, pkgs ? import ../.. { inherit system config; },
}: }:
import ./make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: {
{
name = "fanout"; name = "fanout";
meta.maintainers = [ lib.maintainers.therishidesai ]; meta.maintainers = [ lib.maintainers.therishidesai ];
@ -34,5 +33,4 @@ import ./make-test-python.nix (
machine.succeed("test -c /dev/fanout0") machine.succeed("test -c /dev/fanout0")
machine.succeed("test -c /dev/fanout1") machine.succeed("test -c /dev/fanout1")
''; '';
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
fenicsScript = pkgs.writeScript "poisson.py" '' fenicsScript = pkgs.writeScript "poisson.py" ''
#!/usr/bin/env python #!/usr/bin/env python
from dolfin import * from dolfin import *
@ -26,8 +25,8 @@ import ./make-test-python.nix (
solve(a == L, u, bc) solve(a == L, u, bc)
print(u) print(u)
''; '';
in in
{ {
name = "fenics"; name = "fenics";
meta = { meta = {
maintainers = with pkgs.lib.maintainers; [ ]; maintainers = with pkgs.lib.maintainers; [ ];
@ -49,5 +48,4 @@ import ./make-test-python.nix (
start_all() start_all()
fenicsnode.succeed("${fenicsScript}") fenicsnode.succeed("${fenicsScript}")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "ferm"; name = "ferm";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ mic92 ]; maintainers = [ mic92 ];
@ -94,5 +93,4 @@ import ./make-test-python.nix (
client.fail("curl --fail -g http://192.168.1.1:8080/status") client.fail("curl --fail -g http://192.168.1.1:8080/status")
client.fail("curl --fail -g http://[fd00::1]:8080/status") client.fail("curl --fail -g http://[fd00::1]:8080/status")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, lib, ... }:
{ pkgs, lib, ... }: {
{
name = "filesender"; name = "filesender";
meta = { meta = {
maintainers = with lib.maintainers; [ nhnn ]; maintainers = with lib.maintainers; [ nhnn ];
@ -144,5 +143,4 @@ import ./make-test-python.nix (
raise Exception("filesender returned invalid html") raise Exception("filesender returned invalid html")
client.succeed("browser-test") client.succeed("browser-test")
''; '';
} }
)

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { lib, ... }:
{ lib, ... }:
{ {
name = "firefoxpwa"; name = "firefoxpwa";
meta.maintainers = with lib.maintainers; [ camillemndn ]; meta.maintainers = with lib.maintainers; [ camillemndn ];
@ -37,5 +36,4 @@ import ./make-test-python.nix (
machine.wait_for_window("Jellyfin") machine.wait_for_window("Jellyfin")
machine.wait_for_text("Jellyfin") machine.wait_for_text("Jellyfin")
''; '';
} }
)

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "firejail"; name = "firejail";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ sgo ]; maintainers = [ sgo ];
@ -91,5 +90,4 @@ import ./make-test-python.nix (
"sudo -u alice firejail --private-tmp --output=/tmp/foo 'bash -c $(id>/tmp/vuln2;echo id)' && cat /tmp/vuln2" "sudo -u alice firejail --private-tmp --output=/tmp/foo 'bash -c $(id>/tmp/vuln2;echo id)' && cat /tmp/vuln2"
) )
''; '';
} }
)

View file

@ -1,10 +1,9 @@
import ../make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: let
let
certs = import ../common/acme/server/snakeoil-certs.nix; certs = import ../common/acme/server/snakeoil-certs.nix;
domain = certs.domain; domain = certs.domain;
in in
{ {
name = "firezone"; name = "firezone";
meta.maintainers = with pkgs.lib.maintainers; [ oddlama ]; meta.maintainers = with pkgs.lib.maintainers; [ oddlama ];
@ -345,5 +344,4 @@ import ../make-test-python.nix (
# Check that we can access the resource through the VPN via IP # Check that we can access the resource through the VPN via IP
client.wait_until_succeeds("ping -c1 -W1 172.20.2.1") client.wait_until_succeeds("ping -c1 -W1 172.20.2.1")
''; '';
} }
)

Some files were not shown because too many files have changed in this diff Show more