feat: enhance EvoBGP with new command-line options for the evobgp-agent, including a watch command for periodic configuration updates. Update go.mod with additional dependencies and improve Docker Compose setup for new services, including NATS and various worker components.
This commit is contained in:
@@ -26,6 +26,7 @@ func TestAPIRefreshApplyJobsBundle(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer srv.Close()
|
||||
tenant, modCDN, modIP, rev, speaker := srv.Store().DemoIDs()
|
||||
srv.apiKeys = parseAPIKeysSpec("nodekey|" + tenant + "|node,opkey|" + tenant + "|operator")
|
||||
|
||||
@@ -35,6 +36,15 @@ func TestAPIRefreshApplyJobsBundle(t *testing.T) {
|
||||
base := ts.URL
|
||||
|
||||
t.Run("prometheus metrics", func(t *testing.T) {
|
||||
// HTTPMiddleware increments the counter after the handler returns, so the scrape
|
||||
// of /metrics does not include that same request; warm with a public route first.
|
||||
warm, _ := http.NewRequest(http.MethodGet, base+"/v1/health", nil)
|
||||
warmResp, err := client.Do(warm)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_, _ = io.Copy(io.Discard, warmResp.Body)
|
||||
_ = warmResp.Body.Close()
|
||||
req, _ := http.NewRequest(http.MethodGet, base+"/metrics", nil)
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user