satellite/metabase: fix flaky TestIteratePendingObjects

A randomly generated UUID can hit something that starts with `00`.

Also fix a tiny mistake in the comment.

Change-Id: I25a8b21e0f9523bc486e5a38b0c3cc9c36515231
This commit is contained in:
Egon Elbre 2023-10-17 14:52:28 +03:00 committed by Storj Robot
parent 7239a99505
commit 97ac27942c
2 changed files with 3 additions and 3 deletions

View File

@ -388,7 +388,7 @@ const (
// Pending means that the object is being uploaded or that the client failed during upload.
// The failed upload may be continued in the future.
Pending = ObjectStatus(1)
// Deleting used to one of the stages, which is not in use anymore.
// Committing used to one of the stages, which is not in use anymore.
_ = ObjectStatus(2)
// CommittedUnversioned means that the object is finished and should be visible for general listing.
CommittedUnversioned = ObjectStatus(3)

View File

@ -502,7 +502,7 @@ func TestIteratePendingObjects(t *testing.T) {
IncludeSystemMetadata: true,
Prefix: "b/",
Cursor: metabase.PendingObjectsCursor{Key: "b/2", StreamID: uuid.UUID{1}},
Cursor: metabase.PendingObjectsCursor{Key: "b/2", StreamID: uuid.UUID{15: 1}},
},
Result: pendingWithoutPrefix("b/",
objects["b/2"],
@ -531,7 +531,7 @@ func TestIteratePendingObjects(t *testing.T) {
IncludeSystemMetadata: true,
Prefix: "c/",
Cursor: metabase.PendingObjectsCursor{Key: "c/", StreamID: uuid.UUID{1}},
Cursor: metabase.PendingObjectsCursor{Key: "c/", StreamID: uuid.UUID{15: 1}},
},
Result: pendingWithoutPrefix("c/",
objects["c/"],