Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ravishankar15 committed Dec 19, 2024
1 parent 574403a commit 62c8855
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions internal/component/loki/process/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestJSONLabelsStage(t *testing.T) {
// The third stage will set some labels from the extracted values above.
// Again, if the value is empty, it is inferred that we want to use the
// populate the label with extracted value of the same name.
stg := `stage.json {
stg := `stage.json {
expressions = {"output" = "log", stream = "stream", timestamp = "time", "extra" = "" }
drop_malformed = true
}
Expand All @@ -62,7 +62,7 @@ func TestJSONLabelsStage(t *testing.T) {
source = "extra"
}
stage.labels {
values = {
values = {
stream = "",
user = "",
ts = "timestamp",
Expand Down Expand Up @@ -648,6 +648,7 @@ func getServiceDataWithLiveDebugging(log *testlivedebugging.Log) func(string) (i
}
ld.SetServiceHost(host)
ld.SetEnabled(true)
ld.SetBufferStreamSize(1000)
ld.AddCallback(
"callback1",
"",
Expand Down Expand Up @@ -679,7 +680,7 @@ func TestLeakyUpdate(t *testing.T) {
numLogsToSend := 1

cfg1 := `
stage.metrics {
stage.metrics {
metric.counter {
name = "paulin_test1"
action = "inc"
Expand All @@ -688,7 +689,7 @@ func TestLeakyUpdate(t *testing.T) {
}` + forwardArgs

cfg2 := `
stage.metrics {
stage.metrics {
metric.counter {
name = "paulin_test2"
action = "inc"
Expand Down Expand Up @@ -731,7 +732,7 @@ func TestMetricsStageRefresh(t *testing.T) {
numLogsToSend := 3

cfgWithMetric := `
stage.metrics {
stage.metrics {
metric.counter {
name = "paulin_test"
action = "inc"
Expand Down Expand Up @@ -776,7 +777,7 @@ func TestMetricsStageRefresh(t *testing.T) {
// We try having a metric with the same name as before so that we can see if there
// is some sort of double registration error for that metric.
cfgWithTwoMetrics := `
stage.metrics {
stage.metrics {
metric.counter {
name = "paulin_test_3"
action = "inc"
Expand Down

0 comments on commit 62c8855

Please sign in to comment.