satellite/metainfo: fix types used in tests

Libuplink is using some aliases to storj package which we will
move directly to libuplink and remove from common/storj.
To make code compilable we need to fix places where we
are using aliased types directly to be able to update libuplink.

Change-Id: I7222a927af3b41e214d1c9204917f3ebce4727ce
This commit is contained in:
Michal Niewrzal 2022-11-07 14:48:31 +01:00
parent e709112eeb
commit e4fab975ad
2 changed files with 12 additions and 12 deletions

View File

@ -781,7 +781,7 @@ func TestEndpoint_Object_With_StorageNodes(t *testing.T) {
response, err := metainfoClient.BeginSegment(ctx, metaclient.BeginSegmentParams{ response, err := metainfoClient.BeginSegment(ctx, metaclient.BeginSegmentParams{
StreamID: beginObjectResponse.StreamID, StreamID: beginObjectResponse.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: 0, Index: 0,
}, },
MaxOrderLimit: memory.MiB.Int64(), MaxOrderLimit: memory.MiB.Int64(),
@ -815,7 +815,7 @@ func TestEndpoint_Object_With_StorageNodes(t *testing.T) {
} }
err = metainfoClient.CommitSegment(ctx, metaclient.CommitSegmentParams{ err = metainfoClient.CommitSegment(ctx, metaclient.CommitSegmentParams{
SegmentID: response.SegmentID, SegmentID: response.SegmentID,
Encryption: storj.SegmentEncryption{ Encryption: metaclient.SegmentEncryption{
EncryptedKey: testrand.Bytes(256), EncryptedKey: testrand.Bytes(256),
}, },
PlainSize: 5000, PlainSize: 5000,
@ -1031,7 +1031,7 @@ func TestEndpoint_Object_With_StorageNodes(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
_, err = metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{ _, err = metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{
StreamID: object.StreamID, StreamID: object.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: -1, Index: -1,
}, },
}) })
@ -1049,7 +1049,7 @@ func TestEndpoint_Object_With_StorageNodes(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
_, err = metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{ _, err = metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{
StreamID: object.StreamID, StreamID: object.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: -1, Index: -1,
}, },
}) })
@ -1068,7 +1068,7 @@ func TestEndpoint_Object_With_StorageNodes(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
_, err = metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{ _, err = metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{
StreamID: object.StreamID, StreamID: object.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: -1, Index: -1,
}, },
}) })

View File

@ -133,12 +133,12 @@ func TestInlineSegment(t *testing.T) {
segmentsData[i] = testrand.Bytes(memory.KiB) segmentsData[i] = testrand.Bytes(memory.KiB)
err = metainfoClient.MakeInlineSegment(ctx, metaclient.MakeInlineSegmentParams{ err = metainfoClient.MakeInlineSegment(ctx, metaclient.MakeInlineSegmentParams{
StreamID: beginObjectResp.StreamID, StreamID: beginObjectResp.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: segment, Index: segment,
}, },
PlainSize: 1024, PlainSize: 1024,
EncryptedInlineData: segmentsData[i], EncryptedInlineData: segmentsData[i],
Encryption: storj.SegmentEncryption{ Encryption: metaclient.SegmentEncryption{
EncryptedKey: testrand.Bytes(256), EncryptedKey: testrand.Bytes(256),
}, },
}) })
@ -188,11 +188,11 @@ func TestInlineSegment(t *testing.T) {
data := testrand.Bytes(10 * memory.KiB) data := testrand.Bytes(10 * memory.KiB)
err = metainfoClient.MakeInlineSegment(ctx, metaclient.MakeInlineSegmentParams{ err = metainfoClient.MakeInlineSegment(ctx, metaclient.MakeInlineSegmentParams{
StreamID: beginObjectResp.StreamID, StreamID: beginObjectResp.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: 0, Index: 0,
}, },
EncryptedInlineData: data, EncryptedInlineData: data,
Encryption: storj.SegmentEncryption{ Encryption: metaclient.SegmentEncryption{
EncryptedKey: testrand.Bytes(256), EncryptedKey: testrand.Bytes(256),
}, },
}) })
@ -205,7 +205,7 @@ func TestInlineSegment(t *testing.T) {
for i, index := range existingSegments { for i, index := range existingSegments {
response, err := metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{ response, err := metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{
StreamID: object.StreamID, StreamID: object.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: index, Index: index,
}, },
}) })
@ -264,7 +264,7 @@ func TestRemoteSegment(t *testing.T) {
response, err := metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{ response, err := metainfoClient.DownloadSegmentWithRS(ctx, metaclient.DownloadSegmentParams{
StreamID: object.StreamID, StreamID: object.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: -1, Index: -1,
}, },
}) })
@ -430,7 +430,7 @@ func TestCommitSegment_Validation(t *testing.T) {
response, err := client.BeginSegment(ctx, metaclient.BeginSegmentParams{ response, err := client.BeginSegment(ctx, metaclient.BeginSegmentParams{
StreamID: beginObjectResponse.StreamID, StreamID: beginObjectResponse.StreamID,
Position: storj.SegmentPosition{ Position: metaclient.SegmentPosition{
Index: 0, Index: 0,
}, },
MaxOrderLimit: memory.MiB.Int64(), MaxOrderLimit: memory.MiB.Int64(),