File tree Expand file tree Collapse file tree 6 files changed +12
-17
lines changed
code/go/0chain.net/blobbercore/allocation Expand file tree Collapse file tree 6 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import (
13
13
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/filestore"
14
14
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/reference"
15
15
"github.com/0chain/blobber/code/go/0chain.net/core/common"
16
- "github.com/0chain/gosdk/core/client"
17
16
"github.com/0chain/gosdk/core/zcncrypto"
18
17
mocket "github.com/selvatico/go-mocket"
19
18
"github.com/stretchr/testify/assert"
@@ -25,14 +24,14 @@ func TestBlobberCore_DeleteFile(t *testing.T) {
25
24
sch := zcncrypto .NewSignatureScheme ("bls0chain" )
26
25
mnemonic := "expose culture dignity plastic digital couple promote best pool error" +
27
26
" brush upgrade correct art become lobster nature moment obtain trial multiply arch miss toe"
28
- _ , err := sch .RecoverKeys (mnemonic )
27
+ w , err := sch .RecoverKeys (mnemonic )
29
28
if err != nil {
30
29
t .Fatal (err )
31
30
}
32
31
ts := time .Now ().Add (time .Hour )
33
32
alloc := makeTestAllocation (common .Timestamp (ts .Unix ()))
34
33
alloc .OwnerPublicKey = sch .GetPublicKey ()
35
- alloc .OwnerID = client . Wallet () .ClientID
34
+ alloc .OwnerID = w .ClientID
36
35
testCases := []struct {
37
36
name string
38
37
context metadata.MD
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import (
18
18
"github.com/0chain/blobber/code/go/0chain.net/core/encryption"
19
19
"github.com/0chain/blobber/code/go/0chain.net/core/logging"
20
20
"github.com/0chain/gosdk/constants"
21
- "github.com/0chain/gosdk/core/client"
22
21
"github.com/0chain/gosdk/core/zcncrypto"
23
22
mocket "github.com/selvatico/go-mocket"
24
23
"go.uber.org/zap"
@@ -32,14 +31,14 @@ func init() {
32
31
func TestBlobberCore_FileChangerUpload (t * testing.T ) {
33
32
sch := zcncrypto .NewSignatureScheme ("bls0chain" )
34
33
mnemonic := "expose culture dignity plastic digital couple promote best pool error brush upgrade correct art become lobster nature moment obtain trial multiply arch miss toe"
35
- _ , err := sch .RecoverKeys (mnemonic )
34
+ w , err := sch .RecoverKeys (mnemonic )
36
35
if err != nil {
37
36
t .Fatal (err )
38
37
}
39
38
ts := time .Now ().Add (time .Hour )
40
39
alloc := makeTestAllocation (common .Timestamp (ts .Unix ()))
41
40
alloc .OwnerPublicKey = sch .GetPublicKey ()
42
- alloc .OwnerID = client . Wallet () .ClientID
41
+ alloc .OwnerID = w .ClientID
43
42
44
43
testCases := []struct {
45
44
name string
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import (
16
16
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/filestore"
17
17
"github.com/0chain/blobber/code/go/0chain.net/core/common"
18
18
"github.com/0chain/blobber/code/go/0chain.net/core/logging"
19
- "github.com/0chain/gosdk/core/client"
20
19
"github.com/0chain/gosdk/core/zcncrypto"
21
20
"go.uber.org/zap"
22
21
"google.golang.org/grpc/metadata"
@@ -30,14 +29,14 @@ func TestBlobberCore_MoveFile(t *testing.T) {
30
29
sch := zcncrypto .NewSignatureScheme ("bls0chain" )
31
30
mnemonic := "expose culture dignity plastic digital couple promote best pool error" +
32
31
" brush upgrade correct art become lobster nature moment obtain trial multiply arch miss toe"
33
- _ , err := sch .RecoverKeys (mnemonic )
32
+ w , err := sch .RecoverKeys (mnemonic )
34
33
if err != nil {
35
34
t .Fatal (err )
36
35
}
37
36
ts := time .Now ().Add (time .Hour )
38
37
alloc := makeTestAllocation (common .Timestamp (ts .Unix ()))
39
38
alloc .OwnerPublicKey = sch .GetPublicKey ()
40
- alloc .OwnerID = client . Wallet () .ClientID
39
+ alloc .OwnerID = w .ClientID
41
40
42
41
testCases := []struct {
43
42
name string
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import (
13
13
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/datastore"
14
14
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/reference"
15
15
"github.com/0chain/blobber/code/go/0chain.net/core/common"
16
- "github.com/0chain/gosdk/core/client"
17
16
"github.com/0chain/gosdk/core/zcncrypto"
18
17
mocket "github.com/selvatico/go-mocket"
19
18
"github.com/stretchr/testify/require"
@@ -23,14 +22,14 @@ func TestMultiOp(t *testing.T) {
23
22
sch := zcncrypto .NewSignatureScheme ("bls0chain" )
24
23
mnemonic := "expose culture dignity plastic digital couple promote best pool error" +
25
24
" brush upgrade correct art become lobster nature moment obtain trial multiply arch miss toe"
26
- _ , err := sch .RecoverKeys (mnemonic )
25
+ w , err := sch .RecoverKeys (mnemonic )
27
26
if err != nil {
28
27
t .Fatal (err )
29
28
}
30
29
ts := time .Now ().Add (time .Hour )
31
30
alloc := makeTestAllocation (common .Timestamp (ts .Unix ()))
32
31
alloc .OwnerPublicKey = sch .GetPublicKey ()
33
- alloc .OwnerID = client . Wallet () .ClientID
32
+ alloc .OwnerID = w .ClientID
34
33
datastore .MocketTheStore (t , true )
35
34
ctx := datastore .GetStore ().CreateTransaction (context .TODO ())
36
35
setupDbMock ()
Original file line number Diff line number Diff line change @@ -145,14 +145,14 @@ func TestBlobberCore_RenameFile(t *testing.T) {
145
145
146
146
sch := zcncrypto .NewSignatureScheme ("bls0chain" )
147
147
mnemonic := "expose culture dignity plastic digital couple promote best pool error brush upgrade correct art become lobster nature moment obtain trial multiply arch miss toe"
148
- _ , err := sch .RecoverKeys (mnemonic )
148
+ w , err := sch .RecoverKeys (mnemonic )
149
149
if err != nil {
150
150
t .Fatal (err )
151
151
}
152
152
ts := time .Now ().Add (time .Hour )
153
153
alloc := makeTestAllocation (common .Timestamp (ts .Unix ()))
154
154
alloc .OwnerPublicKey = sch .GetPublicKey ()
155
- alloc .OwnerID = client . Wallet () .ClientID
155
+ alloc .OwnerID = w .ClientID
156
156
157
157
testCases := []struct {
158
158
name string
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import (
12
12
"github.com/0chain/blobber/code/go/0chain.net/core/common"
13
13
"github.com/0chain/blobber/code/go/0chain.net/core/encryption"
14
14
"github.com/0chain/blobber/code/go/0chain.net/core/logging"
15
- "github.com/0chain/gosdk/core/client"
16
15
"github.com/0chain/gosdk/core/zcncrypto"
17
16
mocket "github.com/selvatico/go-mocket"
18
17
"github.com/stretchr/testify/assert"
@@ -29,14 +28,14 @@ func TestBlobberCore_UpdateFile(t *testing.T) {
29
28
30
29
sch := zcncrypto .NewSignatureScheme ("bls0chain" )
31
30
mnemonic := "expose culture dignity plastic digital couple promote best pool error brush upgrade correct art become lobster nature moment obtain trial multiply arch miss toe"
32
- _ , err := sch .RecoverKeys (mnemonic )
31
+ w , err := sch .RecoverKeys (mnemonic )
33
32
if err != nil {
34
33
t .Fatal (err )
35
34
}
36
35
ts := time .Now ().Add (time .Hour )
37
36
alloc := makeTestAllocation (common .Timestamp (ts .Unix ()))
38
37
alloc .OwnerPublicKey = sch .GetPublicKey ()
39
- alloc .OwnerID = client . Wallet () .ClientID
38
+ alloc .OwnerID = w .ClientID
40
39
41
40
testCases := []struct {
42
41
name string
You can’t perform that action at this time.
0 commit comments