@@ -22,8 +22,8 @@ import (
22
22
23
23
"github.com/davecgh/go-spew/spew"
24
24
"github.com/golang/protobuf/proto"
25
- "github.com/hyperledger/fabric/common/ledger/testutil"
26
25
"github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset"
26
+ "github.com/stretchr/testify/assert"
27
27
)
28
28
29
29
const (
@@ -35,12 +35,12 @@ const (
35
35
// v1.0. This is to make sure that any incompatible changes does not go uncaught.
36
36
func TestKVRWSetV1BackwardCompatible (t * testing.T ) {
37
37
protoBytes , err := ioutil .ReadFile (binaryTestFileName )
38
- testutil . AssertNoError (t , err , "" )
38
+ assert . NoError (t , err )
39
39
kvrwset1 := & kvrwset.KVRWSet {}
40
- testutil . AssertNoError (t , proto .Unmarshal (protoBytes , kvrwset1 ), "" )
40
+ assert . NoError (t , proto .Unmarshal (protoBytes , kvrwset1 ))
41
41
kvrwset2 := constructSampleKVRWSet ()
42
42
t .Logf ("kvrwset1=%s, kvrwset2=%s" , spew .Sdump (kvrwset1 ), spew .Sdump (kvrwset2 ))
43
- testutil . AssertEquals (t , kvrwset1 , kvrwset2 )
43
+ assert . Equal (t , kvrwset2 , kvrwset1 )
44
44
}
45
45
46
46
// testPrepareBinaryFileSampleKVRWSetV1 constructs a proto message for kvrwset and marshals its bytes to file 'kvrwsetV1ProtoBytes'.
@@ -49,8 +49,8 @@ func TestKVRWSetV1BackwardCompatible(t *testing.T) {
49
49
// using golang test framwork
50
50
func testPrepareBinaryFileSampleKVRWSetV1 (t * testing.T ) {
51
51
b , err := proto .Marshal (constructSampleKVRWSet ())
52
- testutil . AssertNoError (t , err , "" )
53
- testutil . AssertNoError (t , ioutil .WriteFile (binaryTestFileName , b , 0775 ), "" )
52
+ assert . NoError (t , err )
53
+ assert . NoError (t , ioutil .WriteFile (binaryTestFileName , b , 0775 ))
54
54
}
55
55
56
56
func constructSampleKVRWSet () * kvrwset.KVRWSet {
0 commit comments