at 23.11-pre 683 B view raw
1import ./make-test-python.nix ({ lib, ... }: { 2 name = "plikd"; 3 meta = with lib.maintainers; { 4 maintainers = [ freezeboy ]; 5 }; 6 7 nodes.machine = { pkgs, ... }: let 8 in { 9 services.plikd.enable = true; 10 environment.systemPackages = [ pkgs.plik ]; 11 }; 12 13 testScript = '' 14 # Service basic test 15 machine.wait_for_unit("plikd") 16 17 # Network test 18 machine.wait_for_open_port(8080) 19 machine.succeed("curl --fail -v http://localhost:8080") 20 21 # Application test 22 machine.execute("echo test > /tmp/data.txt") 23 machine.succeed("plik --server http://localhost:8080 /tmp/data.txt | grep curl") 24 25 machine.succeed("diff data.txt /tmp/data.txt") 26 ''; 27})