nixos/tests: add phlactery

This commit is contained in:
Nguyễn Gia Phong 2022-06-29 04:17:38 +09:00
parent f5f338c846
commit ce910fca88
No known key found for this signature in database
GPG Key ID: 27148B2C06A2224B
3 changed files with 23 additions and 1 deletions

View File

@ -424,6 +424,7 @@ in {
php = handleTest ./php {};
php80 = handleTest ./php { php = pkgs.php80; };
php81 = handleTest ./php { php = pkgs.php81; };
phylactery = handleTest ./web-apps/phylactery.nix {};
pict-rs = handleTest ./pict-rs.nix {};
pinnwand = handleTest ./pinnwand.nix {};
plasma5 = handleTest ./plasma5.nix {};

View File

@ -0,0 +1,20 @@
import ../make-test-python.nix ({ pkgs, lib, ... }: {
name = "phylactery";
nodes.machine = { ... }: {
services.phylactery = rec {
enable = true;
port = 8080;
library = "/tmp";
};
};
testScript = ''
start_all()
machine.wait_for_unit('phylactery')
machine.wait_for_open_port(8080)
machine.wait_until_succeeds('curl localhost:8080')
'';
meta.maintainers = with lib.maintainers; [ McSinyx ];
})

View File

@ -1,4 +1,4 @@
{ lib, buildGoPackage, fetchFromSourcehut }:
{ lib, buildGoPackage, fetchFromSourcehut, nixosTests }:
buildGoPackage rec {
pname = "phylactery";
@ -15,6 +15,7 @@ buildGoPackage rec {
# Upstream repo doesn't provide any test.
doCheck = false;
passthru.tests.phylactery = nixosTests.phylactery;
meta = with lib; {
description = "Old school comic web server";