mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nixos/mympd: add nixos test
This commit is contained in:
parent
3c4ddf8284
commit
d3ef138c1b
@ -542,6 +542,7 @@ in {
|
||||
munin = handleTest ./munin.nix {};
|
||||
mutableUsers = handleTest ./mutable-users.nix {};
|
||||
mxisd = handleTest ./mxisd.nix {};
|
||||
mympd = handleTest ./mympd.nix {};
|
||||
mysql = handleTest ./mysql/mysql.nix {};
|
||||
mysql-autobackup = handleTest ./mysql/mysql-autobackup.nix {};
|
||||
mysql-backup = handleTest ./mysql/mysql-backup.nix {};
|
||||
|
27
nixos/tests/mympd.nix
Normal file
27
nixos/tests/mympd.nix
Normal file
@ -0,0 +1,27 @@
|
||||
import ./make-test-python.nix ({pkgs, lib, ... }: {
|
||||
name = "mympd";
|
||||
|
||||
nodes.mympd = {
|
||||
services.mympd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
http_port = 8081;
|
||||
};
|
||||
};
|
||||
|
||||
services.mpd.enable = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all();
|
||||
machine.wait_for_unit("mympd.service");
|
||||
|
||||
# Ensure that mympd can connect to mpd
|
||||
machine.wait_until_succeeds(
|
||||
"journalctl -eu mympd -o cat | grep 'Connected to MPD'"
|
||||
)
|
||||
|
||||
# Ensure that the web server is working
|
||||
machine.succeed("curl http://localhost:8081 --compressed | grep -o myMPD")
|
||||
'';
|
||||
})
|
Loading…
Reference in New Issue
Block a user