-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstorj_test.go
56 lines (51 loc) · 1.53 KB
/
storj_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
package storjds_test
import (
"testing"
dstest "github.com/ipfs/go-datastore/test"
"storj.io/common/testcontext"
storjds "storj.io/ipfs-go-ds-storj"
"storj.io/ipfs-go-ds-storj/testutil"
"storj.io/storj/private/testplanet"
)
func TestIPFSSuite_Datastore(t *testing.T) {
testutil.RunDatastoreTest(t, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet, storj *storjds.Datastore) {
t.Run("basic operations", func(t *testing.T) {
dstest.SubtestBasicPutGet(t, storj)
})
t.Run("not found operations", func(t *testing.T) {
dstest.SubtestNotFounds(t, storj)
})
t.Run("query prefix", func(t *testing.T) {
dstest.SubtestPrefix(t, storj)
})
t.Run("query order", func(t *testing.T) {
dstest.SubtestOrder(t, storj)
})
t.Run("quert limit", func(t *testing.T) {
dstest.SubtestLimit(t, storj)
})
t.Run("query filter", func(t *testing.T) {
dstest.SubtestFilter(t, storj)
})
t.Run("many puts and gets, query", func(t *testing.T) {
dstest.SubtestManyKeysAndQuery(t, storj)
})
t.Run("query return sizes", func(t *testing.T) {
dstest.SubtestReturnSizes(t, storj)
})
t.Run("basic sync", func(t *testing.T) {
dstest.SubtestBasicSync(t, storj)
})
t.Run("batch", func(t *testing.T) {
dstest.RunBatchTest(t, storj)
})
t.Run("batch delete", func(t *testing.T) {
dstest.RunBatchDeleteTest(t, storj)
})
t.Run("batch put and delete", func(t *testing.T) {
dstest.RunBatchPutAndDeleteTest(t, storj)
})
})
}