nixos/tests/podgrab: init

+38 -1
+1
nixos/tests/all-tests.nix
··· 321 pleroma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./pleroma.nix {}; 322 plikd = handleTest ./plikd.nix {}; 323 plotinus = handleTest ./plotinus.nix {}; 324 podman = handleTestOn ["x86_64-linux"] ./podman.nix {}; 325 pomerium = handleTestOn ["x86_64-linux"] ./pomerium.nix {}; 326 postfix = handleTest ./postfix.nix {};
··· 321 pleroma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./pleroma.nix {}; 322 plikd = handleTest ./plikd.nix {}; 323 plotinus = handleTest ./plotinus.nix {}; 324 + podgrab = handleTest ./podgrab.nix {}; 325 podman = handleTestOn ["x86_64-linux"] ./podman.nix {}; 326 pomerium = handleTestOn ["x86_64-linux"] ./pomerium.nix {}; 327 postfix = handleTest ./postfix.nix {};
+34
nixos/tests/podgrab.nix
···
··· 1 + let 2 + defaultPort = 8080; 3 + customPort = 4242; 4 + in 5 + import ./make-test-python.nix ({ pkgs, ... }: { 6 + name = "podgrab"; 7 + 8 + nodes = { 9 + default = { ... }: { 10 + services.podgrab.enable = true; 11 + }; 12 + 13 + customized = { ... }: { 14 + services.podgrab = { 15 + enable = true; 16 + port = customPort; 17 + }; 18 + }; 19 + }; 20 + 21 + testScript = '' 22 + start_all() 23 + 24 + default.wait_for_unit("podgrab") 25 + default.wait_for_open_port("${toString defaultPort}") 26 + default.succeed("curl --fail http://localhost:${toString defaultPort}") 27 + 28 + customized.wait_for_unit("podgrab") 29 + customized.wait_for_open_port("${toString customPort}") 30 + customized.succeed("curl --fail http://localhost:${toString customPort}") 31 + ''; 32 + 33 + meta.maintainers = with pkgs.lib.maintainers; [ ambroisie ]; 34 + })
+3 -1
pkgs/servers/misc/podgrab/default.nix
··· 1 - { lib, fetchFromGitHub, buildGoModule }: 2 3 buildGoModule rec { 4 pname = "podgrab"; ··· 18 cp -r $src/client $out/share/ 19 cp -r $src/webassets $out/share/ 20 ''; 21 22 meta = with lib; { 23 description = "A self-hosted podcast manager to download episodes as soon as they become live";
··· 1 + { lib, fetchFromGitHub, buildGoModule, nixosTests }: 2 3 buildGoModule rec { 4 pname = "podgrab"; ··· 18 cp -r $src/client $out/share/ 19 cp -r $src/webassets $out/share/ 20 ''; 21 + 22 + passthru.tests = { inherit (nixosTests) podgrab; }; 23 24 meta = with lib; { 25 description = "A self-hosted podcast manager to download episodes as soon as they become live";