at master 846 B view raw
1import ../../make-test-python.nix ( 2 { lib, pkgs, ... }: 3 { 4 name = "rss-bridge-caddy"; 5 meta.maintainers = with lib.maintainers; [ mynacol ]; 6 7 nodes.machine = 8 { ... }: 9 { 10 services.rss-bridge = { 11 enable = true; 12 webserver = "caddy"; 13 virtualHost = "localhost:80"; 14 config.system.enabled_bridges = [ "DemoBridge" ]; 15 }; 16 }; 17 18 testScript = '' 19 machine.wait_for_unit("caddy.service") 20 machine.wait_for_unit("phpfpm-rss-bridge.service") 21 machine.wait_for_open_port(80) 22 23 # check for successful feed download 24 response = machine.succeed("curl -f 'http://localhost:80/?action=display&bridge=DemoBridge&context=testCheckbox&format=Atom'") 25 assert '<title type="html">Test</title>' in response, "Feed didn't load successfully" 26 ''; 27 } 28)