Browse Source

gofmt -s.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
pull/5805/head
Alexey Palazhchenko 7 years ago
parent
commit
64cce683cc
  1. 8
      db_test.go
  2. 16
      head_test.go
  3. 12
      index/index_test.go

8
db_test.go

@ -89,7 +89,7 @@ func TestDataAvailableOnlyAfterCommit(t *testing.T) {
seriesSet = query(t, querier, labels.NewEqualMatcher("foo", "bar"))
testutil.Equals(t, seriesSet, map[string][]sample{`{foo="bar"}`: []sample{{t: 0, v: 0}}})
testutil.Equals(t, seriesSet, map[string][]sample{`{foo="bar"}`: {{t: 0, v: 0}}})
}
func TestDataNotAvailableAfterRollback(t *testing.T) {
@ -156,7 +156,7 @@ func TestDBAppenderAddRef(t *testing.T) {
res := query(t, q, labels.NewEqualMatcher("a", "b"))
testutil.Equals(t, map[string][]sample{
labels.FromStrings("a", "b").String(): []sample{
labels.FromStrings("a", "b").String(): {
{t: 123, v: 0},
{t: 124, v: 1},
{t: 125, v: 0},
@ -310,7 +310,7 @@ func TestSkippingInvalidValuesInSameTxn(t *testing.T) {
ssMap := query(t, q, labels.NewEqualMatcher("a", "b"))
testutil.Equals(t, map[string][]sample{
labels.New(labels.Label{"a", "b"}).String(): []sample{{0, 1}},
labels.New(labels.Label{"a", "b"}).String(): {{0, 1}},
}, ssMap)
testutil.Ok(t, q.Close())
@ -329,7 +329,7 @@ func TestSkippingInvalidValuesInSameTxn(t *testing.T) {
ssMap = query(t, q, labels.NewEqualMatcher("a", "b"))
testutil.Equals(t, map[string][]sample{
labels.New(labels.Label{"a", "b"}).String(): []sample{{0, 1}, {10, 3}},
labels.New(labels.Label{"a", "b"}).String(): {{0, 1}, {10, 3}},
}, ssMap)
testutil.Ok(t, q.Close())
}

16
head_test.go

@ -179,17 +179,17 @@ func TestHead_Truncate(t *testing.T) {
testutil.Assert(t, postingsC1 == nil, "")
testutil.Equals(t, map[string]struct{}{
"": struct{}{}, // from 'all' postings list
"a": struct{}{},
"b": struct{}{},
"1": struct{}{},
"2": struct{}{},
"": {}, // from 'all' postings list
"a": {},
"b": {},
"1": {},
"2": {},
}, h.symbols)
testutil.Equals(t, map[string]stringset{
"a": stringset{"1": struct{}{}, "2": struct{}{}},
"b": stringset{"1": struct{}{}},
"": stringset{"": struct{}{}},
"a": {"1": struct{}{}, "2": struct{}{}},
"b": {"1": struct{}{}},
"": {"": struct{}{}},
}, h.values)
}

12
index/index_test.go

@ -192,12 +192,12 @@ func TestIndexRW_Postings(t *testing.T) {
}
err = iw.AddSymbols(map[string]struct{}{
"a": struct{}{},
"b": struct{}{},
"1": struct{}{},
"2": struct{}{},
"3": struct{}{},
"4": struct{}{},
"a": {},
"b": {},
"1": {},
"2": {},
"3": {},
"4": {},
})
testutil.Ok(t, err)

Loading…
Cancel
Save