1 import ./make-test-python.nix ({ pkgs, ... }: {
3 meta = with pkgs.lib; {
4 maintainers = with maintainers; [ _1000101 ];
8 prometheus = { ... }: {
9 services.prometheus.enable = true;
10 networking.firewall.allowedTCPPorts = [ 9090 ];
12 trickster = { ... }: {
13 services.trickster.enable = true;
19 prometheus.wait_for_unit("prometheus.service")
20 prometheus.wait_for_open_port(9090)
21 prometheus.wait_until_succeeds(
22 "curl -fL http://localhost:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'"
24 trickster.wait_for_unit("trickster.service")
25 trickster.wait_for_open_port(8082)
26 trickster.wait_for_open_port(9090)
27 trickster.wait_until_succeeds(
28 "curl -fL http://localhost:8082/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'"
30 trickster.wait_until_succeeds(
31 "curl -fL http://prometheus:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'"
33 trickster.wait_until_succeeds(
34 "curl -fL http://localhost:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'"