Skip to content

Commit

Permalink
feat: extend test cases from feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jdockerty committed Jan 17, 2024
1 parent 362468d commit 86d8dee
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tsdb/series_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,26 @@ func TestParseSeriesKey(t *testing.T) {
seriesKey: tsdb.AppendSeriesKey(nil, []byte{}, nil),
expectedKey: nil,
},
{
name: "invalid series key with tags",

This comment has been minimized.

Copy link
@davidby-influx

davidby-influx Jan 17, 2024

Contributor

Nice addition!

seriesKey: tsdb.AppendSeriesKey(nil, []byte{}, models.NewTags(map[string]string{"tag1": "foo"})),
expectedKey: nil,
},
{
name: "valid series key with tags",
seriesKey: tsdb.AppendSeriesKey(nil, []byte("foo"), models.NewTags(map[string]string{"tag1": "foo"})),
expectedKey: []byte("foo"),
},
{
name: "valid series key with empty tags",
seriesKey: tsdb.AppendSeriesKey(nil, []byte("foo"), models.NewTags(map[string]string{})),
expectedKey: []byte("foo"),
},
{
name: "valid series key with nil tags",
seriesKey: tsdb.AppendSeriesKey(nil, []byte("foo"), models.NewTags(nil)),
expectedKey: []byte("foo"),
},
{
name: "valid series key with no tags",
seriesKey: tsdb.AppendSeriesKey(nil, []byte("foo"), nil),
Expand Down

0 comments on commit 86d8dee

Please sign in to comment.