at 25.11-pre 659 B view raw
1import ./make-test-python.nix ( 2 { pkgs, lib, ... }: 3 { 4 name = "sonic-server"; 5 6 meta = { 7 maintainers = with lib.maintainers; [ anthonyroussel ]; 8 }; 9 10 nodes.machine = 11 { pkgs, ... }: 12 { 13 services.sonic-server.enable = true; 14 }; 15 16 testScript = '' 17 machine.start() 18 19 machine.wait_for_unit("sonic-server.service") 20 machine.wait_for_open_port(1491) 21 22 with subtest("Check control mode"): 23 result = machine.succeed('(echo START control; sleep 1; echo PING; echo QUIT) | nc localhost 1491').splitlines() 24 assert result[2] == "PONG", f"expected 'PONG', got '{result[2]}'" 25 ''; 26 } 27)