mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixosTests: migrate tests to runTests (#389964)
This commit is contained in:
commit
48e041d23c
27 changed files with 1151 additions and 1211 deletions
|
@ -1300,26 +1300,26 @@ in {
|
|||
wrappers = handleTest ./wrappers.nix {};
|
||||
writefreely = handleTest ./web-apps/writefreely.nix {};
|
||||
wstunnel = runTest ./wstunnel.nix;
|
||||
xandikos = handleTest ./xandikos.nix {};
|
||||
xautolock = handleTest ./xautolock.nix {};
|
||||
xfce = handleTest ./xfce.nix {};
|
||||
xfce-wayland = handleTest ./xfce-wayland.nix {};
|
||||
xmonad = handleTest ./xmonad.nix {};
|
||||
xmonad-xdg-autostart = handleTest ./xmonad-xdg-autostart.nix {};
|
||||
xpadneo = handleTest ./xpadneo.nix {};
|
||||
xrdp = handleTest ./xrdp.nix {};
|
||||
xrdp-with-audio-pulseaudio = handleTest ./xrdp-with-audio-pulseaudio.nix {};
|
||||
xandikos = runTest ./xandikos.nix;
|
||||
xautolock = runTest ./xautolock.nix;
|
||||
xfce = runTest ./xfce.nix;
|
||||
xfce-wayland = runTest ./xfce-wayland.nix;
|
||||
xmonad = runTest ./xmonad.nix;
|
||||
xmonad-xdg-autostart = runTest ./xmonad-xdg-autostart.nix;
|
||||
xpadneo = runTest ./xpadneo.nix;
|
||||
xrdp = runTest ./xrdp.nix;
|
||||
xrdp-with-audio-pulseaudio = runTest ./xrdp-with-audio-pulseaudio.nix;
|
||||
xscreensaver = handleTest ./xscreensaver.nix {};
|
||||
xss-lock = handleTest ./xss-lock.nix {};
|
||||
xterm = handleTest ./xterm.nix {};
|
||||
xxh = handleTest ./xxh.nix {};
|
||||
yabar = handleTest ./yabar.nix {};
|
||||
xss-lock = runTest ./xss-lock.nix;
|
||||
xterm = runTest ./xterm.nix;
|
||||
xxh = runTest ./xxh.nix;
|
||||
yabar = runTest ./yabar.nix;
|
||||
ydotool = handleTest ./ydotool.nix {};
|
||||
yggdrasil = handleTest ./yggdrasil.nix {};
|
||||
your_spotify = handleTest ./your_spotify.nix {};
|
||||
zammad = handleTest ./zammad.nix {};
|
||||
zenohd = handleTest ./zenohd.nix {};
|
||||
zeronet-conservancy = handleTest ./zeronet-conservancy.nix {};
|
||||
yggdrasil = runTest ./yggdrasil.nix;
|
||||
your_spotify = runTest ./your_spotify.nix;
|
||||
zammad = runTest ./zammad.nix;
|
||||
zenohd = runTest ./zenohd.nix;
|
||||
zeronet-conservancy = runTest ./zeronet-conservancy.nix;
|
||||
zfs = handleTest ./zfs.nix {};
|
||||
zigbee2mqtt_1 = runTest {
|
||||
imports = [ ./zigbee2mqtt.nix ];
|
||||
|
@ -1329,12 +1329,12 @@ in {
|
|||
imports = [ ./zigbee2mqtt.nix ];
|
||||
_module.args.package = pkgs.zigbee2mqtt_2;
|
||||
};
|
||||
zipline = handleTest ./zipline.nix {};
|
||||
zoneminder = handleTest ./zoneminder.nix {};
|
||||
zookeeper = handleTest ./zookeeper.nix {};
|
||||
zram-generator = handleTest ./zram-generator.nix {};
|
||||
zrepl = handleTest ./zrepl.nix {};
|
||||
zsh-history = handleTest ./zsh-history.nix {};
|
||||
zwave-js = handleTest ./zwave-js.nix {};
|
||||
zwave-js-ui = handleTest ./zwave-js-ui.nix {};
|
||||
zipline = runTest ./zipline.nix;
|
||||
zoneminder = runTest ./zoneminder.nix;
|
||||
zookeeper = runTest ./zookeeper.nix;
|
||||
zram-generator = runTest ./zram-generator.nix;
|
||||
zrepl = runTest ./zrepl.nix;
|
||||
zsh-history = runTest ./zsh-history.nix;
|
||||
zwave-js = runTest ./zwave-js.nix;
|
||||
zwave-js-ui = runTest ./zwave-js-ui.nix;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
name = "xandikos";
|
||||
|
@ -70,4 +69,3 @@ import ./make-test-python.nix (
|
|||
)
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
name = "xautolock";
|
||||
meta.maintainers = [ ];
|
||||
|
@ -24,4 +21,3 @@ import ./make-test-python.nix (
|
|||
machine.succeed("pgrep xlock")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "xfce-wayland";
|
||||
|
||||
|
@ -68,4 +66,3 @@ import ./make-test-python.nix (
|
|||
machine.screenshot("screen")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "xfce";
|
||||
|
||||
|
@ -73,4 +71,3 @@ import ./make-test-python.nix (
|
|||
machine.screenshot("screen")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "xmonad-xdg-autostart";
|
||||
|
@ -34,11 +33,10 @@ import ./make-test-python.nix (
|
|||
testScript =
|
||||
{ nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
user = nodes.machine.users.users.alice;
|
||||
in
|
||||
''
|
||||
machine.wait_for_x()
|
||||
machine.wait_for_file("${user.home}/xdg-autostart-executed")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
|
@ -84,7 +83,7 @@ import ./make-test-python.nix (
|
|||
testScript =
|
||||
{ nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
user = nodes.machine.users.users.alice;
|
||||
in
|
||||
''
|
||||
machine.wait_for_x()
|
||||
|
@ -128,4 +127,3 @@ import ./make-test-python.nix (
|
|||
machine.wait_for_file("/tmp/somefile")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
name = "xpadneo";
|
||||
|
@ -18,4 +17,3 @@ import ./make-test-python.nix (
|
|||
machine.succeed("modinfo hid_xpadneo | grep 'version:\s\+${pkgs.linuxPackages.xpadneo.version}'")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# How to interactively test this module if the audio actually works
|
||||
|
@ -107,4 +106,3 @@ import ./make-test-python.nix (
|
|||
client.screenshot("remoterdp")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "xrdp";
|
||||
|
@ -33,7 +32,7 @@ import ./make-test-python.nix (
|
|||
testScript =
|
||||
{ nodes, ... }:
|
||||
let
|
||||
user = nodes.client.config.users.users.alice;
|
||||
user = nodes.client.users.users.alice;
|
||||
in
|
||||
''
|
||||
start_all()
|
||||
|
@ -57,4 +56,3 @@ import ./make-test-python.nix (
|
|||
client.screenshot("remoterdp")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "xss-lock";
|
||||
meta.maintainers = [ ];
|
||||
|
@ -51,4 +49,3 @@ import ./make-test-python.nix (
|
|||
perform_xsslock_test(custom_lockcmd, "xlock")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "xterm";
|
||||
|
@ -6,9 +5,7 @@ import ./make-test-python.nix (
|
|||
maintainers = [ nequissimus ];
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nodes.machine = {
|
||||
imports = [ ./common/x11.nix ];
|
||||
services.xserver.desktopManager.xterm.enable = false;
|
||||
};
|
||||
|
@ -23,4 +20,3 @@ import ./make-test-python.nix (
|
|||
machine.screenshot("window")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
|
@ -73,4 +72,3 @@ import ./make-test-python.nix (
|
|||
client.succeed("xxh server -i /root/.ssh/id_ecdsa +hc \'echo $0\' +i +s zsh +I xxh-shell-zsh+path+${xxh-shell-zsh} | grep -Fq '/root/.xxh/.xxh/shells/xxh-shell-zsh/build/zsh-bin/bin/zsh'")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "yabar";
|
||||
meta.maintainers = [ ];
|
||||
|
@ -30,4 +28,3 @@ import ./make-test-python.nix (
|
|||
machine.screenshot("top_bar")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -25,7 +25,6 @@ let
|
|||
danIp6 = bobPrefix + "::2";
|
||||
|
||||
in
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "yggdrasil";
|
||||
|
@ -33,7 +32,7 @@ import ./make-test-python.nix (
|
|||
maintainers = [ gazally ];
|
||||
};
|
||||
|
||||
nodes = rec {
|
||||
nodes = {
|
||||
# Alice is listening for peerings on a specified port,
|
||||
# but has multicast peering disabled. Alice has part of her
|
||||
# yggdrasil config in Nix and part of it in a file.
|
||||
|
@ -106,9 +105,7 @@ import ./make-test-python.nix (
|
|||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostBridge = "br0";
|
||||
config =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
config = {
|
||||
networking.interfaces.eth0.ipv6 = {
|
||||
addresses = [
|
||||
{
|
||||
|
@ -194,4 +191,3 @@ import ./make-test-python.nix (
|
|||
carol.succeed("curl --fail -g http://[${danIp6}]")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "your_spotify";
|
||||
|
@ -33,4 +32,3 @@ import ./make-test-python.nix (
|
|||
assert "<title>Your Spotify</title>" in out
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
@ -9,9 +8,7 @@ import ./make-test-python.nix (
|
|||
netali
|
||||
];
|
||||
|
||||
nodes.machine =
|
||||
{ config, ... }:
|
||||
{
|
||||
nodes.machine = {
|
||||
virtualisation = {
|
||||
memorySize = 2048;
|
||||
};
|
||||
|
@ -39,4 +36,3 @@ import ./make-test-python.nix (
|
|||
)
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
@ -9,7 +8,6 @@ import ./make-test-python.nix (
|
|||
router =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
@ -90,4 +88,3 @@ import ./make-test-python.nix (
|
|||
client.succeed(f"curl router:8000/{be}/test | grep hello")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = 43110;
|
||||
in
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "zeronet-conservancy";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ fgaz ];
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.zeronet = {
|
||||
enable = true;
|
||||
|
@ -27,4 +29,3 @@ import ./make-test-python.nix (
|
|||
machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "zipline";
|
||||
|
@ -41,4 +40,3 @@ import ./make-test-python.nix (
|
|||
assert json.loads(resp)["user"]["id"] == data["user"]["id"]
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
|
@ -23,4 +22,3 @@ import ./make-test-python.nix (
|
|||
machine.succeed("curl --fail http://localhost:8095/")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
|
||||
|
@ -51,4 +50,3 @@ import ./make-test-python.nix (
|
|||
)
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test-python.nix {
|
||||
{
|
||||
name = "zram-generator";
|
||||
|
||||
nodes = {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import ./make-test-python.nix ({
|
||||
{
|
||||
name = "zrepl";
|
||||
|
||||
nodes.host =
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
config = {
|
||||
# Prerequisites for ZFS and tests.
|
||||
|
@ -73,4 +73,4 @@ import ./make-test-python.nix ({
|
|||
"zrepl_zfs_snapshot_duration_count{filesystem=\"test\"}" in out
|
||||
), "zrepl snapshot counter for test was not found in Prometheus output"
|
||||
'';
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "zsh-history";
|
||||
|
@ -37,4 +36,3 @@ import ./make-test-python.nix (
|
|||
default.succeed("/run/current-system/sw/bin/history list | grep -q foobar")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "zwave-js-ui";
|
||||
|
@ -28,4 +27,3 @@ import ./make-test-python.nix (
|
|||
machine.wait_for_file("/var/lib/zwave-js-ui/users.json")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
|
@ -15,9 +14,7 @@ import ./make-test-python.nix (
|
|||
meta.maintainers = with lib.maintainers; [ graham33 ];
|
||||
|
||||
nodes = {
|
||||
machine =
|
||||
{ config, ... }:
|
||||
{
|
||||
machine = {
|
||||
services.zwave-js = {
|
||||
enable = true;
|
||||
serialPort = "/dev/null";
|
||||
|
@ -35,4 +32,3 @@ import ./make-test-python.nix (
|
|||
machine.wait_until_succeeds("journalctl --since -1m --unit zwave-js --grep 'ZwaveJS server listening'")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue