satellite/metainfo: adjust tests to changes in uplink
One of uplink method changed its signature and we need to fix test on satellite side. Change-Id: Ib89ea6aa25c57bac11bc3e0e9c2c89a4b9debd7c
This commit is contained in:
parent
8263f18321
commit
50bea3ab1a
4
go.mod
4
go.mod
@ -44,9 +44,9 @@ require (
|
|||||||
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
|
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
|
||||||
google.golang.org/api v0.20.0 // indirect
|
google.golang.org/api v0.20.0 // indirect
|
||||||
google.golang.org/protobuf v1.25.0 // indirect
|
google.golang.org/protobuf v1.25.0 // indirect
|
||||||
storj.io/common v0.0.0-20210113135631-07a5dc68dc1c
|
storj.io/common v0.0.0-20210119231202-8321551aa24d
|
||||||
storj.io/drpc v0.0.16
|
storj.io/drpc v0.0.16
|
||||||
storj.io/monkit-jaeger v0.0.0-20200518165323-80778fc3f91b
|
storj.io/monkit-jaeger v0.0.0-20200518165323-80778fc3f91b
|
||||||
storj.io/private v0.0.0-20210108233641-2ba1ef686d1f
|
storj.io/private v0.0.0-20210108233641-2ba1ef686d1f
|
||||||
storj.io/uplink v1.4.5
|
storj.io/uplink v1.4.6-0.20210125122828-3cf0f8cae40f
|
||||||
)
|
)
|
||||||
|
11
go.sum
11
go.sum
@ -68,8 +68,6 @@ github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13P
|
|||||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
||||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||||
github.com/btcsuite/btcutil v1.0.1/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts=
|
github.com/btcsuite/btcutil v1.0.1/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts=
|
||||||
github.com/btcsuite/btcutil v1.0.3-0.20201124182144-4031bdc69ded h1:WcPFZzCIqGt/TdFJHsOiX5dIlB/MUzrftltMhpjzfA8=
|
|
||||||
github.com/btcsuite/btcutil v1.0.3-0.20201124182144-4031bdc69ded/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o=
|
|
||||||
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ=
|
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ=
|
||||||
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o=
|
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o=
|
||||||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
||||||
@ -916,9 +914,8 @@ sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2
|
|||||||
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
|
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
|
||||||
storj.io/common v0.0.0-20200424175742-65ac59022f4f/go.mod h1:pZyXiIE7bGETIRXtfs0nICqMwp7PM8HqnDuyUeldNA0=
|
storj.io/common v0.0.0-20200424175742-65ac59022f4f/go.mod h1:pZyXiIE7bGETIRXtfs0nICqMwp7PM8HqnDuyUeldNA0=
|
||||||
storj.io/common v0.0.0-20201026135900-1aaeec90670b/go.mod h1:GqdmNf3fLm2UZX/7Zr0BLFCJ4gFjgm6eHrk/fnmr5jQ=
|
storj.io/common v0.0.0-20201026135900-1aaeec90670b/go.mod h1:GqdmNf3fLm2UZX/7Zr0BLFCJ4gFjgm6eHrk/fnmr5jQ=
|
||||||
storj.io/common v0.0.0-20201207172416-78f4e59925c3/go.mod h1:6sepaQTRLuygvA+GNPzdgRPOB1+wFfjde76KBWofbMY=
|
storj.io/common v0.0.0-20210119231202-8321551aa24d h1:lOLCRtsKISuZlK2lBI5O0uBAc44mp/yO3CtUTXNNSUc=
|
||||||
storj.io/common v0.0.0-20210113135631-07a5dc68dc1c h1:07A5QJMYYYQrOQv51j6RiOTstzMh7OnbqTZGZljp9/M=
|
storj.io/common v0.0.0-20210119231202-8321551aa24d/go.mod h1:KhVByBTvjV2rsaUQsft0pKgBRRMvCcY1JsDqt6BWr3I=
|
||||||
storj.io/common v0.0.0-20210113135631-07a5dc68dc1c/go.mod h1:KhVByBTvjV2rsaUQsft0pKgBRRMvCcY1JsDqt6BWr3I=
|
|
||||||
storj.io/drpc v0.0.11/go.mod h1:TiFc2obNjL9/3isMW1Rpxjy8V9uE0B2HMeMFGiiI7Iw=
|
storj.io/drpc v0.0.11/go.mod h1:TiFc2obNjL9/3isMW1Rpxjy8V9uE0B2HMeMFGiiI7Iw=
|
||||||
storj.io/drpc v0.0.14/go.mod h1:82nfl+6YwRwF6UG31cEWWUqv/FaKvP5SGqUvoqTxCMA=
|
storj.io/drpc v0.0.14/go.mod h1:82nfl+6YwRwF6UG31cEWWUqv/FaKvP5SGqUvoqTxCMA=
|
||||||
storj.io/drpc v0.0.16 h1:9sxypc5lKi/0D69cR21BR0S21+IvXfON8L5nXMVNTwQ=
|
storj.io/drpc v0.0.16 h1:9sxypc5lKi/0D69cR21BR0S21+IvXfON8L5nXMVNTwQ=
|
||||||
@ -927,5 +924,5 @@ storj.io/monkit-jaeger v0.0.0-20200518165323-80778fc3f91b h1:Bbg9JCtY6l3HrDxs3BX
|
|||||||
storj.io/monkit-jaeger v0.0.0-20200518165323-80778fc3f91b/go.mod h1:gj4vuCeyCRjRmH8LIrgoyU9Dc9uR6H+/GcDUXmTbf80=
|
storj.io/monkit-jaeger v0.0.0-20200518165323-80778fc3f91b/go.mod h1:gj4vuCeyCRjRmH8LIrgoyU9Dc9uR6H+/GcDUXmTbf80=
|
||||||
storj.io/private v0.0.0-20210108233641-2ba1ef686d1f h1:ctEwD9AsWR8MGv+hKxATjsu114lOPuL2wL7fqO2qusg=
|
storj.io/private v0.0.0-20210108233641-2ba1ef686d1f h1:ctEwD9AsWR8MGv+hKxATjsu114lOPuL2wL7fqO2qusg=
|
||||||
storj.io/private v0.0.0-20210108233641-2ba1ef686d1f/go.mod h1:3KcGiA7phL3a0HUCe5ar90SlIU3iFb8hKInaEZQ5P7o=
|
storj.io/private v0.0.0-20210108233641-2ba1ef686d1f/go.mod h1:3KcGiA7phL3a0HUCe5ar90SlIU3iFb8hKInaEZQ5P7o=
|
||||||
storj.io/uplink v1.4.5 h1:aeJgbob2YtnVPgzrzw16XwmYr241ibuZBhPqVwvyR3E=
|
storj.io/uplink v1.4.6-0.20210125122828-3cf0f8cae40f h1:Ed8NG6WvameV55uzYgDsE4U3D1y3/xSWHXqnpeS1BDc=
|
||||||
storj.io/uplink v1.4.5/go.mod h1:VoxYTP5AzJ+gnzsqptuB5Ra8Old+fVVbwLCmi4jr5y4=
|
storj.io/uplink v1.4.6-0.20210125122828-3cf0f8cae40f/go.mod h1:6a95Ux48DWIhFDaNo3fV3ehyfD9lX//fGK9JiIdFbXo=
|
||||||
|
@ -179,7 +179,7 @@ func TestRevokeMacaroon(t *testing.T) {
|
|||||||
err = client.CommitObject(ctx, metainfo.CommitObjectParams{StreamID: encodedStreamID})
|
err = client.CommitObject(ctx, metainfo.CommitObjectParams{StreamID: encodedStreamID})
|
||||||
assert.True(t, errs2.IsRPC(err, rpcstatus.PermissionDenied))
|
assert.True(t, errs2.IsRPC(err, rpcstatus.PermissionDenied))
|
||||||
|
|
||||||
_, _, _, err = client.BeginSegment(ctx, metainfo.BeginSegmentParams{StreamID: encodedStreamID})
|
_, err = client.BeginSegment(ctx, metainfo.BeginSegmentParams{StreamID: encodedStreamID})
|
||||||
assert.True(t, errs2.IsRPC(err, rpcstatus.PermissionDenied))
|
assert.True(t, errs2.IsRPC(err, rpcstatus.PermissionDenied))
|
||||||
|
|
||||||
err = client.MakeInlineSegment(ctx, metainfo.MakeInlineSegmentParams{StreamID: encodedStreamID})
|
err = client.MakeInlineSegment(ctx, metainfo.MakeInlineSegmentParams{StreamID: encodedStreamID})
|
||||||
@ -270,7 +270,7 @@ func TestInvalidAPIKey(t *testing.T) {
|
|||||||
err = client.CommitObject(ctx, metainfo.CommitObjectParams{StreamID: streamID})
|
err = client.CommitObject(ctx, metainfo.CommitObjectParams{StreamID: streamID})
|
||||||
assertInvalidArgument(t, err, false)
|
assertInvalidArgument(t, err, false)
|
||||||
|
|
||||||
_, _, _, err = client.BeginSegment(ctx, metainfo.BeginSegmentParams{StreamID: streamID})
|
_, err = client.BeginSegment(ctx, metainfo.BeginSegmentParams{StreamID: streamID})
|
||||||
assertInvalidArgument(t, err, false)
|
assertInvalidArgument(t, err, false)
|
||||||
|
|
||||||
err = client.MakeInlineSegment(ctx, metainfo.MakeInlineSegmentParams{StreamID: streamID})
|
err = client.MakeInlineSegment(ctx, metainfo.MakeInlineSegmentParams{StreamID: streamID})
|
||||||
@ -639,7 +639,7 @@ func TestBeginCommit(t *testing.T) {
|
|||||||
beginObjectResponse, err := metainfoClient.BeginObject(ctx, params)
|
beginObjectResponse, err := metainfoClient.BeginObject(ctx, params)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
segmentID, limits, _, err := metainfoClient.BeginSegment(ctx, metainfo.BeginSegmentParams{
|
response, err := metainfoClient.BeginSegment(ctx, metainfo.BeginSegmentParams{
|
||||||
StreamID: beginObjectResponse.StreamID,
|
StreamID: beginObjectResponse.StreamID,
|
||||||
Position: storj.SegmentPosition{
|
Position: storj.SegmentPosition{
|
||||||
Index: 0,
|
Index: 0,
|
||||||
@ -654,9 +654,9 @@ func TestBeginCommit(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
makeResult := func(num int32) *pb.SegmentPieceUploadResult {
|
makeResult := func(num int32) *pb.SegmentPieceUploadResult {
|
||||||
nodeID := limits[num].Limit.StorageNodeId
|
nodeID := response.Limits[num].Limit.StorageNodeId
|
||||||
hash := &pb.PieceHash{
|
hash := &pb.PieceHash{
|
||||||
PieceId: limits[num].Limit.PieceId,
|
PieceId: response.Limits[num].Limit.PieceId,
|
||||||
PieceSize: 1048832,
|
PieceSize: 1048832,
|
||||||
Timestamp: time.Now(),
|
Timestamp: time.Now(),
|
||||||
}
|
}
|
||||||
@ -674,7 +674,7 @@ func TestBeginCommit(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = metainfoClient.CommitSegment(ctx, metainfo.CommitSegmentParams{
|
err = metainfoClient.CommitSegment(ctx, metainfo.CommitSegmentParams{
|
||||||
SegmentID: segmentID,
|
SegmentID: response.SegmentID,
|
||||||
|
|
||||||
SizeEncryptedData: memory.MiB.Int64(),
|
SizeEncryptedData: memory.MiB.Int64(),
|
||||||
UploadResult: []*pb.SegmentPieceUploadResult{
|
UploadResult: []*pb.SegmentPieceUploadResult{
|
||||||
@ -1518,7 +1518,7 @@ func TestCommitObjectMetadataSize(t *testing.T) {
|
|||||||
beginObjectResponse, err := metainfoClient.BeginObject(ctx, params)
|
beginObjectResponse, err := metainfoClient.BeginObject(ctx, params)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
segmentID, limits, _, err := metainfoClient.BeginSegment(ctx, metainfo.BeginSegmentParams{
|
response, err := metainfoClient.BeginSegment(ctx, metainfo.BeginSegmentParams{
|
||||||
StreamID: beginObjectResponse.StreamID,
|
StreamID: beginObjectResponse.StreamID,
|
||||||
Position: storj.SegmentPosition{
|
Position: storj.SegmentPosition{
|
||||||
Index: 0,
|
Index: 0,
|
||||||
@ -1533,9 +1533,9 @@ func TestCommitObjectMetadataSize(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
makeResult := func(num int32) *pb.SegmentPieceUploadResult {
|
makeResult := func(num int32) *pb.SegmentPieceUploadResult {
|
||||||
nodeID := limits[num].Limit.StorageNodeId
|
nodeID := response.Limits[num].Limit.StorageNodeId
|
||||||
hash := &pb.PieceHash{
|
hash := &pb.PieceHash{
|
||||||
PieceId: limits[num].Limit.PieceId,
|
PieceId: response.Limits[num].Limit.PieceId,
|
||||||
PieceSize: 1048832,
|
PieceSize: 1048832,
|
||||||
Timestamp: time.Now(),
|
Timestamp: time.Now(),
|
||||||
}
|
}
|
||||||
@ -1553,7 +1553,7 @@ func TestCommitObjectMetadataSize(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = metainfoClient.CommitSegment(ctx, metainfo.CommitSegmentParams{
|
err = metainfoClient.CommitSegment(ctx, metainfo.CommitSegmentParams{
|
||||||
SegmentID: segmentID,
|
SegmentID: response.SegmentID,
|
||||||
|
|
||||||
SizeEncryptedData: memory.MiB.Int64(),
|
SizeEncryptedData: memory.MiB.Int64(),
|
||||||
UploadResult: []*pb.SegmentPieceUploadResult{
|
UploadResult: []*pb.SegmentPieceUploadResult{
|
||||||
|
Loading…
Reference in New Issue
Block a user