diff options
author | freezeboy <freezeboy@users.noreply.github.com> | 2020-11-13 15:00:34 +0100 |
---|---|---|
committer | freezeboy <freezeboy@users.noreply.github.com> | 2021-02-23 15:35:52 +0100 |
commit | 10fa80fd300ce9cd081b578621861332ddf3e411 (patch) | |
tree | 7cd0f6f557e004b18e08cb3b5443fdbf486a092a /nixos | |
parent | fc2ae7d79e31aade4bbbabc66ba57a456851b4df (diff) | |
download | nixpkgs-10fa80fd300ce9cd081b578621861332ddf3e411.tar nixpkgs-10fa80fd300ce9cd081b578621861332ddf3e411.tar.gz nixpkgs-10fa80fd300ce9cd081b578621861332ddf3e411.tar.bz2 nixpkgs-10fa80fd300ce9cd081b578621861332ddf3e411.tar.lz nixpkgs-10fa80fd300ce9cd081b578621861332ddf3e411.tar.xz nixpkgs-10fa80fd300ce9cd081b578621861332ddf3e411.tar.zst nixpkgs-10fa80fd300ce9cd081b578621861332ddf3e411.zip |
nixos/tests: new test for plikd
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/plikd.nix | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 541e0bc0a5c..ab8d79981fb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -306,6 +306,7 @@ in pinnwand = handleTest ./pinnwand.nix {}; plasma5 = handleTest ./plasma5.nix {}; pleroma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./pleroma.nix {}; + plikd = handleTest ./plikd.nix {}; plotinus = handleTest ./plotinus.nix {}; podman = handleTestOn ["x86_64-linux"] ./podman.nix {}; postfix = handleTest ./postfix.nix {}; diff --git a/nixos/tests/plikd.nix b/nixos/tests/plikd.nix new file mode 100644 index 00000000000..8fec93c01f6 --- /dev/null +++ b/nixos/tests/plikd.nix @@ -0,0 +1,27 @@ +import ./make-test-python.nix ({ lib, ... }: { + name = "plikd"; + meta = with lib.maintainers; { + maintainers = [ freezeboy ]; + }; + + machine = { pkgs, ... }: let + in { + services.plikd.enable = true; + environment.systemPackages = [ pkgs.plik ]; + }; + + testScript = '' + # Service basic test + machine.wait_for_unit("plikd") + + # Network test + machine.wait_for_open_port("8080") + machine.succeed("curl --fail -v http://localhost:8080") + + # Application test + machine.execute("echo test > /tmp/data.txt") + machine.succeed("plik --server http://localhost:8080 /tmp/data.txt | grep curl") + + machine.succeed("diff data.txt /tmp/data.txt") + ''; +}) |