Skip to content

Commit

Permalink
nixos/pingvin-share: add nixos test
Browse files Browse the repository at this point in the history
  • Loading branch information
RatCornu committed Feb 15, 2024
1 parent a539ef0 commit 411b9f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ in {
php83 = handleTest ./php { php = pkgs.php83; };
phylactery = handleTest ./web-apps/phylactery.nix {};
pict-rs = handleTest ./pict-rs.nix {};
pingvin-share = handleTest ./pingvin-share.nix {} ;
pinnwand = handleTest ./pinnwand.nix {};
plantuml-server = handleTest ./plantuml-server.nix {};
plasma-bigscreen = handleTest ./plasma-bigscreen.nix {};
Expand Down
3 changes: 2 additions & 1 deletion nixos/tests/pingvin-share.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {

testScript = ''
machine.wait_for_unit("pingvin-share-frontend.service")
machine.wait_for_open_port(9010)
machine.wait_for_open_port(9011)
machine.succeed("curl --fail http://127.0.0.1:9010/")
machine.succeed("curl --fail http://127.0.0.1:9010/api/configs")
machine.succeed("curl --fail http://127.0.0.1:9011/")
'';
})
5 changes: 5 additions & 0 deletions pkgs/servers/pingvin-share/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ callPackage
, fetchFromGitHub
, recurseIntoAttrs
, nixosTests
}:

let
Expand All @@ -17,4 +18,8 @@ recurseIntoAttrs {
backend = callPackage ./backend.nix { inherit src version; };

frontend = callPackage ./frontend.nix { inherit src version; };

passthru.tests = {
pingvin-share = nixosTests.pingvin-share;
};
}

0 comments on commit 411b9f7

Please sign in to comment.