Skip to content

Commit 4e5077f

Browse files
authored
Merge branch 'main' into feat/agentctl_test_logs_inspect
2 parents 43038c1 + b354efc commit 4e5077f

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
> **Deprecation notice**: Grafana Agent has been deprecated and is now in
2+
> Long-Term Support mode. We recommend migrating to the new Grafana Alloy
3+
> collector, which is built on the foundation of Grafana Agent Flow.
4+
>
5+
> For more information, read our blog posts about Alloy and how to easily
6+
> migrate from Agent to Alloy:
7+
>
8+
> * [Alloy announcement blog post](https://grafana.com/blog/2024/04/09/grafana-alloy-opentelemetry-collector-with-prometheus-pipelines/)
9+
> * [Alloy FAQ](https://grafana.com/blog/2024/04/09/grafana-agent-to-grafana-alloy-opentelemetry-collector-faq/)
10+
> * [Migrate to Alloy](https://grafana.com/docs/alloy/latest/tasks/migrate/)
11+
112
<p align="center"><img src="docs/sources/assets/logo_and_name.png" alt="Grafana Agent logo"></p>
213

314
Grafana Agent is an OpenTelemetry Collector distribution with configuration

internal/cmd/integration-tests/tests/read-log-file/read_log_file_test.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ func TestReadLogFile(t *testing.T) {
1717
err := common.FetchDataFromURL(query, &logResponse)
1818
assert.NoError(c, err)
1919
if assert.NotEmpty(c, logResponse.Data.Result) {
20-
assert.Equal(c, logResponse.Data.Result[0].Stream["filename"], "logs.txt")
21-
logs := make([]string, len(logResponse.Data.Result[0].Values))
22-
for i, valuePair := range logResponse.Data.Result[0].Values {
23-
logs[i] = valuePair[1]
20+
logs := make([]string, 0)
21+
for _, result := range logResponse.Data.Result {
22+
assert.Equal(c, result.Stream["filename"], "logs.txt")
23+
for _, valuePair := range result.Values {
24+
logs = append(logs, valuePair[1])
25+
}
2426
}
2527
assert.Contains(c, logs, "[2023-10-02 14:25:43] INFO: Starting the web application...")
2628
}

0 commit comments

Comments
 (0)