nixosTests/rss-bridge: improve and add caddy
This commit is contained in:
parent
3cade1b5ac
commit
874d00ecf4
@ -921,7 +921,7 @@ in {
|
||||
rshim = handleTest ./rshim.nix {};
|
||||
rspamd = handleTest ./rspamd.nix {};
|
||||
rspamd-trainer = handleTest ./rspamd-trainer.nix {};
|
||||
rss-bridge = handleTest ./web-apps/rss-bridge.nix {};
|
||||
rss-bridge = handleTest ./web-apps/rss-bridge {};
|
||||
rss2email = handleTest ./rss2email.nix {};
|
||||
rstudio-server = handleTest ./rstudio-server.nix {};
|
||||
rsyncd = handleTest ./rsyncd.nix {};
|
||||
|
@ -1,22 +0,0 @@
|
||||
{ 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'")
|
||||
'';
|
||||
}
|
28
nixos/tests/web-apps/rss-bridge/caddy.nix
Normal file
28
nixos/tests/web-apps/rss-bridge/caddy.nix
Normal file
@ -0,0 +1,28 @@
|
||||
import ../../make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
name = "rss-bridge-caddy";
|
||||
meta.maintainers = with lib.maintainers; [ mynacol ];
|
||||
|
||||
nodes.machine =
|
||||
{ ... }:
|
||||
{
|
||||
services.rss-bridge = {
|
||||
enable = true;
|
||||
webserver = "caddy";
|
||||
virtualHost = "localhost:80";
|
||||
config.system.enabled_bridges = [ "DemoBridge" ];
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("caddy.service")
|
||||
machine.wait_for_unit("phpfpm-rss-bridge.service")
|
||||
machine.wait_for_open_port(80)
|
||||
|
||||
# check for successful feed download
|
||||
response = machine.succeed("curl -f 'http://localhost:80/?action=display&bridge=DemoBridge&context=testCheckbox&format=Atom'")
|
||||
assert '<title type="html">Test</title>' in response, "Feed didn't load successfully"
|
||||
'';
|
||||
}
|
||||
)
|
5
nixos/tests/web-apps/rss-bridge/default.nix
Normal file
5
nixos/tests/web-apps/rss-bridge/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ system, pkgs, ... }:
|
||||
{
|
||||
nginx = import ./nginx.nix { inherit system pkgs; };
|
||||
caddy = import ./caddy.nix { inherit system pkgs; };
|
||||
}
|
27
nixos/tests/web-apps/rss-bridge/nginx.nix
Normal file
27
nixos/tests/web-apps/rss-bridge/nginx.nix
Normal file
@ -0,0 +1,27 @@
|
||||
import ../../make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
name = "rss-bridge-nginx";
|
||||
meta.maintainers = with lib.maintainers; [ mynacol ];
|
||||
|
||||
nodes.machine =
|
||||
{ ... }:
|
||||
{
|
||||
services.rss-bridge = {
|
||||
enable = true;
|
||||
webserver = "nginx";
|
||||
config.system.enabled_bridges = [ "DemoBridge" ];
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("nginx.service")
|
||||
machine.wait_for_unit("phpfpm-rss-bridge.service")
|
||||
machine.wait_for_open_port(80)
|
||||
|
||||
# check for successful feed download
|
||||
response = machine.succeed("curl -f 'http://localhost:80/?action=display&bridge=DemoBridge&context=testCheckbox&format=Atom'")
|
||||
assert '<title type="html">Test</title>' in response, "Feed didn't load successfully"
|
||||
'';
|
||||
}
|
||||
)
|
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
basic-functionality = nixosTests.rss-bridge;
|
||||
inherit (nixosTests.rss-bridge) caddy nginx;
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user