nixos/rss-bridge: Add simple NixOS test (#331291)
This commit is contained in:
commit
10ae9d0b8f
@ -872,6 +872,7 @@ in {
|
||||
rshim = handleTest ./rshim.nix {};
|
||||
rspamd = handleTest ./rspamd.nix {};
|
||||
rspamd-trainer = handleTest ./rspamd-trainer.nix {};
|
||||
rss-bridge = handleTest ./web-apps/rss-bridge.nix {};
|
||||
rss2email = handleTest ./rss2email.nix {};
|
||||
rstudio-server = handleTest ./rstudio-server.nix {};
|
||||
rsyncd = handleTest ./rsyncd.nix {};
|
||||
|
22
nixos/tests/web-apps/rss-bridge.nix
Normal file
22
nixos/tests/web-apps/rss-bridge.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "rss-bridge";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ mynacol ];
|
||||
|
||||
nodes.machine =
|
||||
{ ... }:
|
||||
{
|
||||
services.rss-bridge = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("nginx.service")
|
||||
machine.wait_for_unit("phpfpm-rss-bridge.service")
|
||||
|
||||
# check for successful feed download
|
||||
machine.succeed("curl -sS -f 'http://localhost/?action=display&bridge=DemoBridge&context=testCheckbox&format=Atom'")
|
||||
'';
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchFromGitHub }:
|
||||
{ stdenv, lib, fetchFromGitHub, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rss-bridge";
|
||||
@ -20,6 +20,10 @@ stdenv.mkDerivation rec {
|
||||
cp -R ./* $out
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
basic-functionality = nixosTests.rss-bridge;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "RSS feed for websites missing it";
|
||||
homepage = "https://github.com/RSS-Bridge/rss-bridge";
|
||||
|
Loading…
Reference in New Issue
Block a user