-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2860 from influxdb/config_tags_sort
Ensure tags are always marshalled the same way
- Loading branch information
Showing
1 changed file
with
4 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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`), | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
otoolep
Author
Contributor
|
||
}, | ||
} { | ||
result := marshalTags(tt.tags) | ||
if !bytes.Equal(result, tt.result) { | ||
|
Is this really being used? Tags are already sorted as part of the of the
Point.Key
. It's a different sort too.