integration: Fix govet errors
This commit is contained in:
@ -75,8 +75,8 @@ func TestMetricDbSizeDefrag(t *testing.T) {
|
|||||||
|
|
||||||
// clear out historical keys
|
// clear out historical keys
|
||||||
creq := &pb.CompactionRequest{Revision: int64(numPuts), Physical: true}
|
creq := &pb.CompactionRequest{Revision: int64(numPuts), Physical: true}
|
||||||
if _, err := kvc.Compact(context.TODO(), creq); err != nil {
|
if _, kerr := kvc.Compact(context.TODO(), creq); kerr != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(kerr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// defrag should give freed space back to fs
|
// defrag should give freed space back to fs
|
||||||
|
@ -166,7 +166,7 @@ func TestV3HashKV(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rev := resp.Header.Revision
|
rev := resp.Header.Revision
|
||||||
hresp, err := mvc.HashKV(context.Background(), &pb.HashKVRequest{0})
|
hresp, err := mvc.HashKV(context.Background(), &pb.HashKVRequest{Revision: 0})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -177,7 +177,7 @@ func TestV3HashKV(t *testing.T) {
|
|||||||
prevHash := hresp.Hash
|
prevHash := hresp.Hash
|
||||||
prevCompactRev := hresp.CompactRevision
|
prevCompactRev := hresp.CompactRevision
|
||||||
for i := 0; i < 10; i++ {
|
for i := 0; i < 10; i++ {
|
||||||
hresp, err := mvc.HashKV(context.Background(), &pb.HashKVRequest{0})
|
hresp, err := mvc.HashKV(context.Background(), &pb.HashKVRequest{Revision: 0})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -519,7 +519,7 @@ func TestV3TxnRangeCompare(t *testing.T) {
|
|||||||
RangeEnd: []byte{0},
|
RangeEnd: []byte{0},
|
||||||
Target: pb.Compare_CREATE,
|
Target: pb.Compare_CREATE,
|
||||||
Result: pb.Compare_LESS,
|
Result: pb.Compare_LESS,
|
||||||
TargetUnion: &pb.Compare_CreateRevision{6},
|
TargetUnion: &pb.Compare_CreateRevision{CreateRevision: 6},
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
@ -530,7 +530,7 @@ func TestV3TxnRangeCompare(t *testing.T) {
|
|||||||
RangeEnd: []byte{0},
|
RangeEnd: []byte{0},
|
||||||
Target: pb.Compare_CREATE,
|
Target: pb.Compare_CREATE,
|
||||||
Result: pb.Compare_LESS,
|
Result: pb.Compare_LESS,
|
||||||
TargetUnion: &pb.Compare_CreateRevision{5},
|
TargetUnion: &pb.Compare_CreateRevision{CreateRevision: 5},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
@ -541,7 +541,7 @@ func TestV3TxnRangeCompare(t *testing.T) {
|
|||||||
RangeEnd: []byte("/a0"),
|
RangeEnd: []byte("/a0"),
|
||||||
Target: pb.Compare_CREATE,
|
Target: pb.Compare_CREATE,
|
||||||
Result: pb.Compare_LESS,
|
Result: pb.Compare_LESS,
|
||||||
TargetUnion: &pb.Compare_CreateRevision{5},
|
TargetUnion: &pb.Compare_CreateRevision{CreateRevision: 5},
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
@ -552,7 +552,7 @@ func TestV3TxnRangeCompare(t *testing.T) {
|
|||||||
RangeEnd: []byte("/a0"),
|
RangeEnd: []byte("/a0"),
|
||||||
Target: pb.Compare_CREATE,
|
Target: pb.Compare_CREATE,
|
||||||
Result: pb.Compare_LESS,
|
Result: pb.Compare_LESS,
|
||||||
TargetUnion: &pb.Compare_CreateRevision{4},
|
TargetUnion: &pb.Compare_CreateRevision{CreateRevision: 4},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
@ -563,7 +563,7 @@ func TestV3TxnRangeCompare(t *testing.T) {
|
|||||||
RangeEnd: []byte("/b0"),
|
RangeEnd: []byte("/b0"),
|
||||||
Target: pb.Compare_VALUE,
|
Target: pb.Compare_VALUE,
|
||||||
Result: pb.Compare_EQUAL,
|
Result: pb.Compare_EQUAL,
|
||||||
TargetUnion: &pb.Compare_Value{[]byte("x")},
|
TargetUnion: &pb.Compare_Value{Value: []byte("x")},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
@ -574,7 +574,7 @@ func TestV3TxnRangeCompare(t *testing.T) {
|
|||||||
RangeEnd: []byte("/a0"),
|
RangeEnd: []byte("/a0"),
|
||||||
Target: pb.Compare_LEASE,
|
Target: pb.Compare_LEASE,
|
||||||
Result: pb.Compare_GREATER,
|
Result: pb.Compare_GREATER,
|
||||||
TargetUnion: &pb.Compare_Lease{0},
|
TargetUnion: &pb.Compare_Lease{Lease: 0},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
@ -585,7 +585,7 @@ func TestV3TxnRangeCompare(t *testing.T) {
|
|||||||
RangeEnd: []byte("/a0"),
|
RangeEnd: []byte("/a0"),
|
||||||
Target: pb.Compare_LEASE,
|
Target: pb.Compare_LEASE,
|
||||||
Result: pb.Compare_EQUAL,
|
Result: pb.Compare_EQUAL,
|
||||||
TargetUnion: &pb.Compare_Lease{0},
|
TargetUnion: &pb.Compare_Lease{Lease: 0},
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user