Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
  • Loading branch information
aknuds1 committed May 31, 2024
1 parent 76b417c commit 3328b82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/distributor/distributor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6847,6 +6847,7 @@ func TestDistributorValidation(t *testing.T) {
}},
expectedErr: status.New(codes.FailedPrecondition, metadataMetricNameMissingMsgFormat),
},
// Validation passes for empty exemplar labels, since we just want to skip the exemplars and not fail the time series as a whole.
"empty exemplar labels": {
metadata: []*mimirpb.MetricMetadata{{MetricFamilyName: "testmetric", Help: "a test metric.", Unit: "", Type: mimirpb.COUNTER}},
labels: [][]mimirpb.LabelAdapter{{{Name: labels.MetricName, Value: "testmetric"}, {Name: "foo", Value: "bar"}}},
Expand All @@ -6859,7 +6860,6 @@ func TestDistributorValidation(t *testing.T) {
TimestampMs: int64(now),
Value: 1,
}},
expectedErr: status.New(codes.FailedPrecondition, fmt.Sprintf(exemplarEmptyLabelsMsgFormat, now, `testmetric{foo="bar"}`, "{}")),
},
} {
t.Run(name, func(t *testing.T) {
Expand Down

0 comments on commit 3328b82

Please sign in to comment.