From b30e35fb2863be84f8702588c06db6bb747d3777 Mon Sep 17 00:00:00 2001 From: gagliardetto Date: Fri, 26 Jan 2024 16:06:54 +0100 Subject: [PATCH] Fix tests --- compactindexsized/build48_test.go | 2 +- compactindexsized/query_test.go | 2 +- deprecated/bucketteer/example/main.go | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/compactindexsized/build48_test.go b/compactindexsized/build48_test.go index c5b6a042..1ea155fe 100644 --- a/compactindexsized/build48_test.go +++ b/compactindexsized/build48_test.go @@ -166,7 +166,7 @@ func TestBuilder48(t *testing.T) { expected := concatBytes( // --- File header // magic - []byte{0x72, 0x64, 0x63, 0x65, 0x63, 0x69, 0x64, 0x78}, + []byte{'c', 'o', 'm', 'p', 'i', 's', 'z', 'd'}, // header size i32tob(31), // value size (36 bytes in this case) diff --git a/compactindexsized/query_test.go b/compactindexsized/query_test.go index b5efdf7b..b8d47997 100644 --- a/compactindexsized/query_test.go +++ b/compactindexsized/query_test.go @@ -37,7 +37,7 @@ func TestOpen_InvalidMagic(t *testing.T) { func TestOpen_HeaderOnly(t *testing.T) { buf := concatBytes( // Magic - []byte{'r', 'd', 'c', 'e', 'c', 'i', 'd', 'x'}, + []byte{'c', 'o', 'm', 'p', 'i', 's', 'z', 'd'}, // header size i32tob(30), // FileSize diff --git a/deprecated/bucketteer/example/main.go b/deprecated/bucketteer/example/main.go index f6afffcf..387c3c50 100644 --- a/deprecated/bucketteer/example/main.go +++ b/deprecated/bucketteer/example/main.go @@ -10,6 +10,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/dustin/go-humanize" "github.com/rpcpool/yellowstone-faithful/bucketteer" + "github.com/rpcpool/yellowstone-faithful/indexmeta" "golang.org/x/exp/mmap" ) @@ -60,7 +61,7 @@ func main() { fmt.Println("writing to file...") writeStartedAt := time.Now() - _, err = buWr.Seal(nil) + _, err = buWr.Seal(indexmeta.Meta{}) if err != nil { panic(err) }