diff --git a/app/status/external/rmq.go b/app/status/external/rmq.go index 05224fb..101a76b 100644 --- a/app/status/external/rmq.go +++ b/app/status/external/rmq.go @@ -45,9 +45,11 @@ func (h *RMQProvider) Status(req Request) (*Response, error) { st := time.Now() client := http.Client{Timeout: h.TimeOut} u := strings.Replace(req.URL, "rmq://", "https://", 1) + u = strings.Replace(u, "/queues/", "/api/queues/", 1) resp, err := client.Get(u) if err != nil { u = strings.Replace(req.URL, "rmq://", "http://", 1) + u = strings.Replace(u, "/queues/", "/api/queues/", 1) resp, err = client.Get(u) if err != nil { return nil, fmt.Errorf("both https and http failed for %s: %w", req.URL, err) diff --git a/app/status/external/rmq_test.go b/app/status/external/rmq_test.go index 06c017a..40ef4f2 100644 --- a/app/status/external/rmq_test.go +++ b/app/status/external/rmq_test.go @@ -14,7 +14,7 @@ import ( func TestRMQ_Status(t *testing.T) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - require.Equal(t, "/queues/feeds/notification.queue", r.URL.Path) + require.Equal(t, "/api/queues/feeds/notification.queue", r.URL.Path) time.Sleep(100 * time.Millisecond) w.WriteHeader(http.StatusOK) body, err := os.ReadFile("testdata/rmq.json")