nixos/trickster: add test
This commit is contained in:
parent
9b0aefac86
commit
4adb3dd7de
@ -276,6 +276,7 @@ in
|
|||||||
tor = handleTest ./tor.nix {};
|
tor = handleTest ./tor.nix {};
|
||||||
transmission = handleTest ./transmission.nix {};
|
transmission = handleTest ./transmission.nix {};
|
||||||
trezord = handleTest ./trezord.nix {};
|
trezord = handleTest ./trezord.nix {};
|
||||||
|
trickster = handleTest ./trickster.nix {};
|
||||||
udisks2 = handleTest ./udisks2.nix {};
|
udisks2 = handleTest ./udisks2.nix {};
|
||||||
upnp = handleTest ./upnp.nix {};
|
upnp = handleTest ./upnp.nix {};
|
||||||
uwsgi = handleTest ./uwsgi.nix {};
|
uwsgi = handleTest ./uwsgi.nix {};
|
||||||
|
29
nixos/tests/trickster.nix
Normal file
29
nixos/tests/trickster.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import ./make-test.nix ({ pkgs, ... }: {
|
||||||
|
name = "trickster";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
|
maintainers = [ "1000101" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes = {
|
||||||
|
prometheus = { ... }: {
|
||||||
|
services.prometheus.enable = true;
|
||||||
|
networking.firewall.allowedTCPPorts = [ 9090 ];
|
||||||
|
};
|
||||||
|
trickster = { ... }: {
|
||||||
|
services.trickster.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
startAll;
|
||||||
|
$prometheus->waitForUnit("prometheus.service");
|
||||||
|
$prometheus->waitForOpenPort(9090);
|
||||||
|
$prometheus->waitUntilSucceeds("curl -L http://localhost:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'");
|
||||||
|
$trickster->waitForUnit("trickster.service");
|
||||||
|
$trickster->waitForOpenPort(8082);
|
||||||
|
$trickster->waitForOpenPort(9090);
|
||||||
|
$trickster->waitUntilSucceeds("curl -L http://localhost:8082/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'");
|
||||||
|
$trickster->waitUntilSucceeds("curl -L http://prometheus:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'");
|
||||||
|
$trickster->waitUntilSucceeds("curl -L http://localhost:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'");
|
||||||
|
'';
|
||||||
|
})
|
@ -22,6 +22,6 @@ buildGoPackage rec {
|
|||||||
homepage = "https://github.com/Comcast/trickster";
|
homepage = "https://github.com/Comcast/trickster";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ maintainers."1000101" ];
|
maintainers = with maintainers; [ maintainers."1000101" ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user