0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #266675 from anthonyroussel/sonic-server-nixos

nixos/sonic-server: init
This commit is contained in:
Mario Rodas 2023-11-25 23:45:16 -05:00 committed by GitHub
commit 1744e3fa01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 103 additions and 0 deletions

View file

@ -766,6 +766,7 @@ in {
sogo = handleTest ./sogo.nix {};
solanum = handleTest ./solanum.nix {};
sonarr = handleTest ./sonarr.nix {};
sonic-server = handleTest ./sonic-server.nix {};
sourcehut = handleTest ./sourcehut.nix {};
spacecookie = handleTest ./spacecookie.nix {};
spark = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./spark {};

View file

@ -0,0 +1,22 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "sonic-server";
meta = {
maintainers = with lib.maintainers; [ anthonyroussel ];
};
nodes.machine = { pkgs, ... }: {
services.sonic-server.enable = true;
};
testScript = ''
machine.start()
machine.wait_for_unit("sonic-server.service")
machine.wait_for_open_port(1491)
with subtest("Check control mode"):
result = machine.succeed('(echo START control; sleep 1; echo PING; echo QUIT) | nc localhost 1491').splitlines()
assert result[2] == "PONG", f"expected 'PONG', got '{result[2]}'"
'';
})