From a17e3f29746f0fa48ffc5b19ffc54f5876ec9ce1 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Fri, 1 Jan 2021 22:08:02 -0800 Subject: [PATCH] fixes go tests --- pkg/storage/storage_test.go | 6 +++--- pkg/storage/tree/tree.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/storage/storage_test.go b/pkg/storage/storage_test.go index 0ea1ca5503..df58e5698d 100644 --- a/pkg/storage/storage_test.go +++ b/pkg/storage/storage_test.go @@ -48,10 +48,10 @@ var _ = Describe("storage package", func() { st2 := testing.ParseTime("0001-01-01-00:00:00") et2 := testing.ParseTime("0001-01-01-00:00:30") key, _ := ParseKey("foo") - err := s.Put(st, et, key, tree) + err := s.Put(st, et, key, tree, "testspy", 100) Expect(err).ToNot(HaveOccurred()) - t2, _, err := s.Get(st2, et2, key) + t2, _, _, _, err := s.Get(st2, et2, key) Expect(err).ToNot(HaveOccurred()) Expect(t2).ToNot(BeNil()) @@ -61,7 +61,7 @@ var _ = Describe("storage package", func() { s2, err = New(cfg) - t3, _, err := s2.Get(st2, et2, key) + t3, _, _, _, err := s2.Get(st2, et2, key) Expect(err).ToNot(HaveOccurred()) Expect(t3).ToNot(BeNil()) diff --git a/pkg/storage/tree/tree.go b/pkg/storage/tree/tree.go index 0f6ee43049..125dba12c2 100644 --- a/pkg/storage/tree/tree.go +++ b/pkg/storage/tree/tree.go @@ -94,7 +94,7 @@ func (t *Tree) String() string { res := "" t.iterate(func(k []byte, v uint64) { if v > 0 { - res += fmt.Sprintf("%q %d\n", k, v) + res += fmt.Sprintf("%q %d\n", k[2:], v) } })