From 98d315b8d8545db41e51eb566265212f6e01d168 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Tue, 9 Jun 2015 17:10:46 -0700 Subject: [PATCH] Ensure tags are always marshalled the same way This added check ensures it's always alphabetically ordered when marshalled. --- tsdb/meta_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tsdb/meta_test.go b/tsdb/meta_test.go index ff4aa643e95..167f140905f 100644 --- a/tsdb/meta_test.go +++ b/tsdb/meta_test.go @@ -108,6 +108,10 @@ func TestMarshalTags(t *testing.T) { tags: map[string]string{"foo": "bar", "baz": "battttt"}, result: []byte(`baz|foo|battttt|bar`), }, + { + tags: map[string]string{"baz": "battttt", "foo": "bar"}, + result: []byte(`baz|foo|battttt|bar`), + }, } { result := marshalTags(tt.tags) if !bytes.Equal(result, tt.result) {