Skip to content

Commit

Permalink
Run make format to please linter
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
  • Loading branch information
chaudum committed Jan 7, 2025
1 parent 34a74b3 commit d1f3d13
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/distributor/field_detection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,15 +448,15 @@ func Test_DetectGenericFields_Enabled(t *testing.T) {
t.Run("disabled if structured metadata is not allowed", func(t *testing.T) {
detector := newFieldDetector(
validationContext{
discoverGenericFields: map[string][]string{"trace_id": []string{"trace_id", "TRACE_ID"}},
discoverGenericFields: map[string][]string{"trace_id": {"trace_id", "TRACE_ID"}},
allowStructuredMetadata: false,
})
require.False(t, detector.shouldDiscoverGenericFields())
})
t.Run("enabled if structured metadata is allowed and map is not empty", func(t *testing.T) {
detector := newFieldDetector(
validationContext{
discoverGenericFields: map[string][]string{"trace_id": []string{"trace_id", "TRACE_ID"}},
discoverGenericFields: map[string][]string{"trace_id": {"trace_id", "TRACE_ID"}},
allowStructuredMetadata: true,
})
require.True(t, detector.shouldDiscoverGenericFields())
Expand All @@ -468,9 +468,9 @@ func Test_DetectGenericFields(t *testing.T) {
detector := newFieldDetector(
validationContext{
discoverGenericFields: map[string][]string{
"trace_id": []string{"trace_id"},
"org_id": []string{"org_id", "user_id", "tenant_id"},
"product_id": []string{"product.id"}, // jsonpath
"trace_id": {"trace_id"},
"org_id": {"org_id", "user_id", "tenant_id"},
"product_id": {"product.id"}, // jsonpath
},
allowStructuredMetadata: true,
})
Expand Down

0 comments on commit d1f3d13

Please sign in to comment.