anchor.diff:          '';
         };
         exporterTest = ''
  -        waitForUnit("prometheus-bind-exporter.service");
  -        waitForOpenPort(9119);
  -        succeed("curl -sSf http://localhost:9119/metrics | grep -q 'bind_query_recursions_total 0'");
  +        wait_for_unit("prometheus-bind-exporter.service")
  +        wait_for_open_port(9119)
  +        succeed(
  +            "curl -sSf http://localhost:9119/metrics | grep -q 'bind_query_recursions_total 0'"
  +        )
         '';
       };
   
  
positive.code:         services.postgresql.enable = true;
        };
        exporterTest = ''
          waitForUnit("prometheus-postgres-exporter.service");
          waitForOpenPort(9187);
          waitForUnit("postgresql.service");
          succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'");
          succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'");
          systemctl("stop postgresql.service");
          succeed("curl -sSf http://localhost:9187/metrics | grep -qv 'pg_exporter_last_scrape_error 0'");
          succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 0'");
          systemctl("start postgresql.service");
          waitForUnit("postgresql.service");
          succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'");
          succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'");
        '';
      };
  
  
negative.code:         };
        };
        exporterTest = ''
          wait_for_unit("nginx.service")
          wait_for_open_port(80)
          wait_for_unit("prometheus-json-exporter.service")
          wait_for_open_port(7979)
          succeed("curl -sSf localhost:7979/metrics | grep -q 'json_test_metric 1'")
        '';
      };
  
  