@@ -58,7 +58,7 @@ func TestPrometheusMetrics(t *testing.T) {
5858
5959 // Give Prometheus a moment to scrape at least once after being ready
6060 time .Sleep (5 * time .Second )
61- resp , err : = waitForEndpoint (prometheusURL + "/-/ready" , healthTimeout )
61+ resp , err = waitForEndpoint (prometheusURL + "/-/ready" , healthTimeout )
6262 if err != nil {
6363 t .Fatalf ("Prometheus not ready: %v" , err )
6464 }
@@ -67,7 +67,7 @@ func TestPrometheusMetrics(t *testing.T) {
6767 // Give Prometheus a moment to scrape at least once after being ready
6868 time .Sleep (5 * time .Second )
6969
70- resp , err : = http .Get (metricsURL )
70+ resp , err = http .Get (metricsURL )
7171 if err != nil {
7272 t .Fatalf ("Failed to get metrics: %v" , err )
7373 }
@@ -123,6 +123,7 @@ func TestDashboardContent(t *testing.T) {
123123 t .Errorf ("Dashboard missing expected content: %q" , expected )
124124 }
125125 }
126+ }
126127
127128// TestPrometheusTargets verifies Prometheus is scraping AgentaFlow
128129func TestPrometheusTargets (t * testing.T ) {
@@ -132,10 +133,6 @@ func TestPrometheusTargets(t *testing.T) {
132133 }
133134}
134135
135- == == == =
136- >> >> >> > Stashed changes
137- == == == =
138- >> >> >> > Stashed changes
139136// waitForAgentaFlowTarget polls the Prometheus targets endpoint until AgentaFlow appears or timeout is reached.
140137func waitForAgentaFlowTarget (url string , timeout , retryWait time.Duration ) (bool , string ) {
141138 deadline := time .Now ().Add (timeout )
@@ -160,21 +157,6 @@ func waitForAgentaFlowTarget(url string, timeout, retryWait time.Duration) (bool
160157 return true , lastBody
161158 }
162159 time .Sleep (retryWait )
163- << << << < Updated upstream
164- << << << < Updated upstream
165- == == == =
166- == == == =
167- >> >> >> > Stashed changes
168- }
169- return false , lastBody
170- return false , lastBody
171-
172- targets := string (body )
173-
174- // Check that AgentaFlow is being scraped
175- if ! strings .Contains (targets , "agentaflow" ) && ! strings .Contains (targets , "9001" ) {
176- t .Errorf ("AgentaFlow target not found in Prometheus targets. Response: %s" , targets )
177- >> >> >> > Stashed changes
178160 }
179161 return false , lastBody
180162}
0 commit comments