tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/pingvin-share: add nixos test
RatCornu
2 years ago
712a04c6
924437f5
+34
-17
4 changed files
expand all
collapse all
unified
split
nixos
tests
all-tests.nix
pingvin-share.nix
pkgs
servers
pingvin-share
backend.nix
frontend.nix
+1
nixos/tests/all-tests.nix
reviewed
···
763
763
php83 = handleTest ./php { php = pkgs.php83; };
764
764
phylactery = handleTest ./web-apps/phylactery.nix {};
765
765
pict-rs = handleTest ./pict-rs.nix {};
766
766
+
pingvin-share = handleTest ./pingvin-share.nix {} ;
766
767
pinnwand = handleTest ./pinnwand.nix {};
767
768
plantuml-server = handleTest ./plantuml-server.nix {};
768
769
plasma-bigscreen = handleTest ./plasma-bigscreen.nix {};
+23
-17
nixos/tests/pingvin-share.nix
reviewed
···
1
1
-
import ./make-test-python.nix ({ lib, pkgs, ... }: {
2
2
-
name = "pingvin-share";
3
3
-
meta.maintainers = with lib.maintainers; [ ratcornu ];
1
1
+
import ./make-test-python.nix (
2
2
+
{ lib, ... }:
3
3
+
{
4
4
+
name = "pingvin-share";
5
5
+
meta.maintainers = with lib.maintainers; [ ratcornu ];
4
6
5
5
-
nodes.machine = { pkgs, ... }: {
6
6
-
services.pingvin-share = {
7
7
-
enable = true;
7
7
+
nodes.machine =
8
8
+
{ ... }:
9
9
+
{
10
10
+
services.pingvin-share = {
11
11
+
enable = true;
8
12
9
9
-
backend.port = 9010;
10
10
-
frontend.port = 9011;
11
11
-
};
12
12
-
};
13
13
+
backend.port = 9010;
14
14
+
frontend.port = 9011;
15
15
+
};
16
16
+
};
13
17
14
14
-
testScript = ''
15
15
-
machine.wait_for_unit("pingvin-share-frontend.service")
16
16
-
machine.wait_for_open_port(9011)
17
17
-
machine.succeed("curl --fail http://127.0.0.1:9010/")
18
18
-
machine.succeed("curl --fail http://127.0.0.1:9011/")
19
19
-
'';
20
20
-
})
18
18
+
testScript = ''
19
19
+
machine.wait_for_unit("pingvin-share-frontend.service")
20
20
+
machine.wait_for_open_port(9010)
21
21
+
machine.wait_for_open_port(9011)
22
22
+
machine.succeed("curl --fail http://127.0.0.1:9010/api/configs")
23
23
+
machine.succeed("curl --fail http://127.0.0.1:9011/")
24
24
+
'';
25
25
+
}
26
26
+
)
+5
pkgs/servers/pingvin-share/backend.nix
reviewed
···
6
6
nodePackages,
7
7
src,
8
8
version,
9
9
+
nixosTests,
9
10
}:
10
11
11
12
buildNpmPackage {
···
33
34
npmDepsHash = "sha256-btjvX+2krSc0/bJqeLcVTqHBVWqiTFipp3MidO9wApY=";
34
35
makeCacheWritable = true;
35
36
npmFlags = [ "--legacy-peer-deps" ];
37
37
+
38
38
+
passthru.tests = {
39
39
+
pingvin-share = nixosTests.pingvin-share;
40
40
+
};
36
41
37
42
meta = with lib; {
38
43
description = "Backend of pingvin-share, a self-hosted file sharing platform";
+5
pkgs/servers/pingvin-share/frontend.nix
reviewed
···
5
5
pkg-config,
6
6
src,
7
7
version,
8
8
+
nixosTests,
8
9
}:
9
10
10
11
buildNpmPackage {
···
25
26
npmDepsHash = "sha256-66CUVLbq2XdOQAr69DcvxTMvOgSR/RTKPaq80JG+8dg=";
26
27
makeCacheWritable = true;
27
28
npmFlags = [ "--legacy-peer-deps" ];
29
29
+
30
30
+
passthru.tests = {
31
31
+
pingvin-share = nixosTests.pingvin-share;
32
32
+
};
28
33
29
34
meta = with lib; {
30
35
description = "Frontend of pingvin-share, a self-hosted file sharing platform";