tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/photoprism: add test
Felix Buehler
3 years ago
0214f024
fb9e8b9b
+24
2 changed files
expand all
collapse all
unified
split
nixos
tests
all-tests.nix
photoprism.nix
+1
nixos/tests/all-tests.nix
···
513
513
pgjwt = handleTest ./pgjwt.nix {};
514
514
pgmanage = handleTest ./pgmanage.nix {};
515
515
phosh = handleTest ./phosh.nix {};
516
516
+
photoprism = handleTest ./photoprism.nix {};
516
517
php = handleTest ./php {};
517
518
php80 = handleTest ./php { php = pkgs.php80; };
518
519
php81 = handleTest ./php { php = pkgs.php81; };
+23
nixos/tests/photoprism.nix
···
1
1
+
import ./make-test-python.nix ({ lib, pkgs, ... }: {
2
2
+
name = "photoprism";
3
3
+
meta.maintainers = with lib.maintainers; [ stunkymonkey ];
4
4
+
5
5
+
nodes.machine = { pkgs, ... }: {
6
6
+
services.photoprism = {
7
7
+
enable = true;
8
8
+
port = 8080;
9
9
+
originalsPath = "/media/photos/";
10
10
+
passwordFile = pkgs.writeText "password" "secret";
11
11
+
};
12
12
+
environment.extraInit = ''
13
13
+
mkdir -p /media/photos
14
14
+
'';
15
15
+
};
16
16
+
17
17
+
testScript = ''
18
18
+
machine.wait_for_unit("multi-user.target")
19
19
+
machine.wait_for_open_port(8080)
20
20
+
response = machine.succeed("curl -vvv -s -H 'Host: photoprism' http://127.0.0.1:8080/library/login")
21
21
+
assert '<title>PhotoPrism</title>' in response, "Login page didn't load successfully"
22
22
+
'';
23
23
+
})