From 10699c37a30a4ef31461037f7d974204f9b55eb3 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Sun, 26 Jun 2022 18:12:15 +0100 Subject: [PATCH] labels: test BytesWithoutLabels does not remove __name__ by default Signed-off-by: Bryan Boreham --- model/labels/labels_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/model/labels/labels_test.go b/model/labels/labels_test.go index 5a897ac5f..e9eaf7827 100644 --- a/model/labels/labels_test.go +++ b/model/labels/labels_test.go @@ -641,6 +641,7 @@ func TestLabels_BytesWithLabels(t *testing.T) { func TestLabels_BytesWithoutLabels(t *testing.T) { require.Equal(t, Labels{{"aaa", "111"}}.Bytes(nil), Labels{{"aaa", "111"}, {"bbb", "222"}, {"ccc", "333"}}.BytesWithoutLabels(nil, "bbb", "ccc")) + require.Equal(t, Labels{{MetricName, "333"}, {"aaa", "111"}}.Bytes(nil), Labels{{MetricName, "333"}, {"aaa", "111"}, {"bbb", "222"}}.BytesWithoutLabels(nil, "bbb")) require.Equal(t, Labels{{"aaa", "111"}}.Bytes(nil), Labels{{MetricName, "333"}, {"aaa", "111"}, {"bbb", "222"}}.BytesWithoutLabels(nil, MetricName, "bbb")) }