Skip to content

Commit

Permalink
Remove unuseful unit test
Browse files Browse the repository at this point in the history
It never even touches the fetcher code
  • Loading branch information
AndrewSisley committed Oct 2, 2023
1 parent 293a6b5 commit 4a4e605
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions db/fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,16 @@ import (

"github.com/sourcenetwork/defradb/client"
"github.com/sourcenetwork/defradb/core"
"github.com/sourcenetwork/defradb/db/base"
"github.com/sourcenetwork/defradb/db/fetcher"
)

func newTestCollectionDescription() client.CollectionDescription {
return client.CollectionDescription{
Name: "users",
ID: uint32(1),
Schema: client.SchemaDescription{
Fields: []client.FieldDescription{
{
Name: "_key",
ID: client.FieldID(1),
Kind: client.FieldKind_DocKey,
},
{
Name: "Name",
ID: client.FieldID(2),
Kind: client.FieldKind_STRING,
Typ: client.LWW_REGISTER,
},
{
Name: "Age",
ID: client.FieldID(3),
Kind: client.FieldKind_INT,
Typ: client.LWW_REGISTER,
},
},
},
}
}

func TestFetcherStartWithoutInit(t *testing.T) {
ctx := context.Background()
df := new(fetcher.DocumentFetcher)
err := df.Start(ctx, core.Spans{})
assert.Error(t, err)
}

func TestMakeIndexPrefixKey(t *testing.T) {
desc := newTestCollectionDescription()
key := base.MakeCollectionKey(desc)
assert.Equal(t, "/1", key.ToString())
}

func TestFetcherGetAllPrimaryIndexEncodedDocSingle(t *testing.T) {
ctx := context.Background()
db, err := newMemoryDB(ctx)
Expand Down

0 comments on commit 4a4e605

Please sign in to comment.