nixpkgs/nixos/tests/botamusique.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.3 KiB
Nix
Raw Normal View History

2021-05-04 12:30:25 +00:00
import ./make-test-python.nix (
{ pkgs, lib, ... }:
2021-05-04 12:30:25 +00:00
{
name = "botamusique";
meta.maintainers = with lib.maintainers; [ hexa ];
2021-05-04 12:30:25 +00:00
nodes = {
machine =
{ config, ... }:
{
networking.extraHosts = ''
127.0.0.1 all.api.radio-browser.info
'';
2021-05-04 12:30:25 +00:00
services.murmur = {
enable = true;
registerName = "NixOS tests";
};
2021-05-04 12:30:25 +00:00
services.botamusique = {
enable = true;
settings = {
server = {
channel = "NixOS tests";
};
2021-05-04 12:30:25 +00:00
bot = {
version = false;
auto_check_update = false;
};
};
2021-05-04 12:30:25 +00:00
};
};
};
testScript = ''
start_all()
machine.wait_for_unit("murmur.service")
machine.wait_for_unit("botamusique.service")
machine.sleep(10)
machine.wait_until_succeeds(
"journalctl -u murmur.service -e | grep -q '<1:botamusique(-1)> Authenticated'"
)
with subtest("Check systemd hardening"):
output = machine.execute("systemctl show botamusique.service")[1]
machine.log(output)
output = machine.execute("systemd-analyze security botamusique.service")[1]
machine.log(output)
'';
}
)