Skip to content

Commit

Permalink
modify UT for collector_fields test
Browse files Browse the repository at this point in the history
  • Loading branch information
jagan2221 committed Dec 10, 2024
1 parent 4cc054c commit a7ff13d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions pkg/configprovider/globprovider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ func TestRemotelyManagedMergeFlow(t *testing.T) {
"collector_fields": map[string]interface{}{
"zone": "eu",
},
"collector_fields1": map[string]interface{}{
"cluster": "cluster-1",
"zone": "eu",
},
},
},
"processor": "someprocessor",
Expand All @@ -198,6 +202,10 @@ func TestLocallyManagedMergeFlow(t *testing.T) {
"cluster": "cluster-1",
"zone": "eu",
},
"collector_fields1": map[string]interface{}{
"cluster": "cluster-1",
"zone": "eu",
},
},
},
"processor": "someprocessor",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ extensions:
childKey: "value"
collector_fields:
cluster: "cluster-1"
collector_fields1:
cluster: "cluster-1"
processor: "someprocessor"
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ extensions:
childKey: "value"
collector_fields:
zone: "eu"
collector_fields1:
zone: "eu"
6 changes: 5 additions & 1 deletion pkg/configprovider/opampprovider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ func TestRemotelyManagedFlowDisabled(t *testing.T) {
exp := confmap.NewFromStringMap(map[string]any{
"extensions::sumologic::childKey": "value",
"extensions::sumologic::collector_fields::cluster": "cluster-1",
"extensions::sumologic::collector_fields::zone": "eu",
"extensions::sumologic::collector_fields::zone": "eu",
"extensions::sumologic::collector_fields1::cluster": "cluster-1",
"extensions::sumologic::collector_fields1::zone": "eu",
"processor": "someprocessor",
"extensions::opamp::remote_configuration_directory": "../globprovider/testdata/mergefunc",
"extensions::opamp::endpoint": "wss://example.com/v1/opamp",
Expand Down Expand Up @@ -179,6 +181,8 @@ func TestRemotelyManagedFlowEnabled(t *testing.T) {
exp := confmap.NewFromStringMap(map[string]any{
"extensions::sumologic::childKey": "value",
"extensions::sumologic::collector_fields::zone": "eu",
"extensions::sumologic::collector_fields1::cluster": "cluster-1",
"extensions::sumologic::collector_fields1::zone": "eu",
"processor": "someprocessor",
"extensions::opamp::remote_configuration_directory": "../globprovider/testdata/mergefunc",
"extensions::opamp::endpoint": "wss://example.com/v1/opamp",
Expand Down

0 comments on commit a7ff13d

Please sign in to comment.