nixos/rss-bridge: Add simple NixOS test (#331291)

This commit is contained in:
Sandro 2024-09-27 16:59:57 +02:00 committed by GitHub
commit 10ae9d0b8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 28 additions and 1 deletions

View File

@ -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 {};

View 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'")
'';
}

View File

@ -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";