Add tests for metrics endpoint

This commit is contained in:
Minei3oat
2025-03-05 08:51:55 +01:00
parent 26a2428512
commit c979ad21ea
2 changed files with 34 additions and 4 deletions

View File

@@ -132,6 +132,10 @@ class FiregexAPI:
json={"name":name,"port":port, "proto": proto, "ip_int": ip_int})
return req.json()["service_id"] if verify(req) else False
def nf_get_metrics(self):
req = self.s.get(f"{self.address}api/nfregex/metrics")
return req.text
#PortHijack
def ph_get_services(self):
req = self.s.get(f"{self.address}api/porthijack/services")