mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
rss-bridge: Add simple NixOS test
Add a simple test that starts rss-bridge and tries to fetch the feed of a demo bridge. On success we know the system setup (web server, PHP) and rss-bridge are working fine. Internet access is avoided by using a demo bridge.
This commit is contained in:
parent
73b80cba20
commit
b444a0e028
@ -847,6 +847,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