nixos/tests/podgrab: init
This commit is contained in:
parent
f1b36d19fd
commit
1144486f3a
|
@ -321,6 +321,7 @@ in
|
|||
pleroma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./pleroma.nix {};
|
||||
plikd = handleTest ./plikd.nix {};
|
||||
plotinus = handleTest ./plotinus.nix {};
|
||||
podgrab = handleTest ./podgrab.nix {};
|
||||
podman = handleTestOn ["x86_64-linux"] ./podman.nix {};
|
||||
pomerium = handleTestOn ["x86_64-linux"] ./pomerium.nix {};
|
||||
postfix = handleTest ./postfix.nix {};
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
let
|
||||
defaultPort = 8080;
|
||||
customPort = 4242;
|
||||
in
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "podgrab";
|
||||
|
||||
nodes = {
|
||||
default = { ... }: {
|
||||
services.podgrab.enable = true;
|
||||
};
|
||||
|
||||
customized = { ... }: {
|
||||
services.podgrab = {
|
||||
enable = true;
|
||||
port = customPort;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
default.wait_for_unit("podgrab")
|
||||
default.wait_for_open_port("${toString defaultPort}")
|
||||
default.succeed("curl --fail http://localhost:${toString defaultPort}")
|
||||
|
||||
customized.wait_for_unit("podgrab")
|
||||
customized.wait_for_open_port("${toString customPort}")
|
||||
customized.succeed("curl --fail http://localhost:${toString customPort}")
|
||||
'';
|
||||
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ ambroisie ];
|
||||
})
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
{ lib, fetchFromGitHub, buildGoModule, nixosTests }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "podgrab";
|
||||
|
@ -19,6 +19,8 @@ buildGoModule rec {
|
|||
cp -r $src/webassets $out/share/
|
||||
'';
|
||||
|
||||
passthru.tests = { inherit (nixosTests) podgrab; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "A self-hosted podcast manager to download episodes as soon as they become live";
|
||||
homepage = "https://github.com/akhilrex/podgrab";
|
||||
|
|
Loading…
Reference in New Issue