Skip to content

Commit efebbcc

Browse files
committed
error fix
1 parent ec5b157 commit efebbcc

File tree

5 files changed

+9
-24
lines changed

5 files changed

+9
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ docs/PHASE2-COMPLETE.md
4747
docs/ALL-PHASES-COMPLETE.md
4848
docs/PHASE2-DELIVERABLES.md
4949
docs/PHASE3-COMPLETE.md
50+
.markdownlint.json

.markdownlint.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
"MD034": false,
1313
"MD036": false,
1414
"MD040": false,
15-
"MD041": false
15+
"MD041": false,
16+
"MD047": false,
17+
"MD058": false
1618
}

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ require (
3434
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3535
github.com/modern-go/reflect2 v1.0.2 // indirect
3636
github.com/spf13/pflag v1.0.5 // indirect
37-
github.com/stretchr/objx v0.5.0 // indirect
3837
github.com/stretchr/testify v1.8.1 // indirect
3938
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0 // indirect
4039
go.opentelemetry.io/proto/otlp v0.19.0 // indirect

go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,9 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
248248
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
249249
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
250250
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
251-
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
252251
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
252+
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
253+
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
253254
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
254255
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
255256
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

tests/integration/health_test.go

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -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
128129
func 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.
140137
func 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

Comments
 (0)