Documentation ¶
Index ¶
- Variables
- func Bench(b *testing.B, fn func(ctx *testcontext.Context, b *testing.B, db *metabase.DB))
- func CreateExpiredObject(ctx *testcontext.Context, t *testing.T, db *metabase.DB, ...) metabase.Object
- func CreateFullObjectsWithKeys(ctx *testcontext.Context, t *testing.T, db *metabase.DB, projectID uuid.UUID, ...) map[metabase.ObjectKey]metabase.LoopObjectEntry
- func CreateObject(ctx *testcontext.Context, t *testing.T, db *metabase.DB, ...) metabase.Object
- func CreatePendingObject(ctx *testcontext.Context, t *testing.T, db *metabase.DB, ...)
- func DefaultRawSegment(obj metabase.ObjectStream, segmentPosition metabase.SegmentPosition) metabase.RawSegment
- func RandObjectStream() metabase.ObjectStream
- func Run(t *testing.T, fn func(ctx *testcontext.Context, t *testing.T, db *metabase.DB))
- type BeginMoveObject
- type BeginObjectExactVersion
- type BeginObjectNextVersion
- type BeginSegment
- type BucketEmpty
- type CommitInlineSegment
- type CommitObject
- type CommitObjectWithSegments
- type CommitSegment
- type CreateTestObject
- type DeleteAll
- type DeleteBucketObjects
- type DeleteExpiredObjects
- type DeleteObjectAnyStatusAllVersions
- type DeleteObjectExactVersion
- type DeleteObjectLatestVersion
- type DeleteObjectsAllVersions
- type DeletePart
- type DeletePendingObject
- type DeleteZombieObjects
- type EnsureNodeAliases
- type FinishMoveObject
- type GetLatestObjectLastSegment
- type GetObjectExactVersion
- type GetObjectLatestVersion
- type GetSegmentByLocation
- type GetSegmentByOffset
- type GetSegmentByPosition
- type GetStreamPieceCountByNodeID
- type GetTableStats
- type InvalidObjectLocation
- type InvalidObjectStream
- type InvalidSegmentLocation
- type IterateCollector
- type IterateLoopObjects
- type IterateLoopSegments
- type IterateObjects
- type IterateObjectsWithStatus
- type IteratePendingObjectsByKey
- type ListNodeAliases
- type ListSegments
- type ListStreamPositions
- type LoopIterateCollector
- type UpdateObjectMetadata
- type UpdateSegmentPieces
- type Verify
Constants ¶
This section is empty.
Variables ¶
var DefaultEncryption = storj.EncryptionParameters{ CipherSuite: storj.EncAESGCM, BlockSize: 29 * 256, }
DefaultEncryption contains default encryption parameters.
var DefaultRedundancy = storj.RedundancyScheme{ Algorithm: storj.ReedSolomon, ShareSize: 2048, RequiredShares: 1, RepairShares: 1, OptimalShares: 1, TotalShares: 1, }
DefaultRedundancy contains default redundancy scheme.
Functions ¶
func CreateExpiredObject ¶
func CreateExpiredObject(ctx *testcontext.Context, t *testing.T, db *metabase.DB, obj metabase.ObjectStream, numberOfSegments byte, expiresAt time.Time) metabase.Object
CreateExpiredObject creates a new committed expired object with the specified number of segments.
func CreateFullObjectsWithKeys ¶
func CreateFullObjectsWithKeys(ctx *testcontext.Context, t *testing.T, db *metabase.DB, projectID uuid.UUID, bucketName string, keys []metabase.ObjectKey) map[metabase.ObjectKey]metabase.LoopObjectEntry
CreateFullObjectsWithKeys creates multiple objects with the specified keys.
func CreateObject ¶
func CreateObject(ctx *testcontext.Context, t *testing.T, db *metabase.DB, obj metabase.ObjectStream, numberOfSegments byte) metabase.Object
CreateObject creates a new committed object with the specified number of segments.
func CreatePendingObject ¶
func CreatePendingObject(ctx *testcontext.Context, t *testing.T, db *metabase.DB, obj metabase.ObjectStream, numberOfSegments byte)
CreatePendingObject creates a new pending object with the specified number of segments.
func DefaultRawSegment ¶ added in v1.30.1
func DefaultRawSegment(obj metabase.ObjectStream, segmentPosition metabase.SegmentPosition) metabase.RawSegment
DefaultRawSegment returns default raw segment.
func RandObjectStream ¶
func RandObjectStream() metabase.ObjectStream
RandObjectStream returns a random object stream.
Types ¶
type BeginMoveObject ¶ added in v1.39.4
type BeginMoveObject struct { Opts metabase.BeginMoveObject Result metabase.BeginMoveObjectResult ErrClass *errs.Class ErrText string }
BeginMoveObject is for testing metabase.BeginMoveObject.
func (BeginMoveObject) Check ¶ added in v1.39.4
func (step BeginMoveObject) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type BeginObjectExactVersion ¶
type BeginObjectExactVersion struct { Opts metabase.BeginObjectExactVersion Version metabase.Version ErrClass *errs.Class ErrText string }
BeginObjectExactVersion is for testing metabase.BeginObjectExactVersion.
func (BeginObjectExactVersion) Check ¶
func (step BeginObjectExactVersion) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type BeginObjectNextVersion ¶
type BeginObjectNextVersion struct { Opts metabase.BeginObjectNextVersion Version metabase.Version ErrClass *errs.Class ErrText string }
BeginObjectNextVersion is for testing metabase.BeginObjectNextVersion.
func (BeginObjectNextVersion) Check ¶
func (step BeginObjectNextVersion) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type BeginSegment ¶
type BeginSegment struct { Opts metabase.BeginSegment ErrClass *errs.Class ErrText string }
BeginSegment is for testing metabase.BeginSegment.
func (BeginSegment) Check ¶
func (step BeginSegment) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type BucketEmpty ¶
type BucketEmpty struct { Opts metabase.BucketEmpty Result bool ErrClass *errs.Class ErrText string }
BucketEmpty is for testing metabase.BucketEmpty.
func (BucketEmpty) Check ¶
func (step BucketEmpty) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type CommitInlineSegment ¶
type CommitInlineSegment struct { Opts metabase.CommitInlineSegment ErrClass *errs.Class ErrText string }
CommitInlineSegment is for testing metabase.CommitInlineSegment.
func (CommitInlineSegment) Check ¶
func (step CommitInlineSegment) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type CommitObject ¶
type CommitObject struct { Opts metabase.CommitObject ErrClass *errs.Class ErrText string }
CommitObject is for testing metabase.CommitObject.
type CommitObjectWithSegments ¶
type CommitObjectWithSegments struct { Opts metabase.CommitObjectWithSegments Deleted []metabase.DeletedSegmentInfo ErrClass *errs.Class ErrText string }
CommitObjectWithSegments is for testing metabase.CommitObjectWithSegments.
type CommitSegment ¶
type CommitSegment struct { Opts metabase.CommitSegment ErrClass *errs.Class ErrText string }
CommitSegment is for testing metabase.CommitSegment.
func (CommitSegment) Check ¶
func (step CommitSegment) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type CreateTestObject ¶
type CreateTestObject struct { BeginObjectExactVersion *metabase.BeginObjectExactVersion CommitObject *metabase.CommitObject }
CreateTestObject is for testing metabase.CreateTestObject.
func (CreateTestObject) Run ¶
func (co CreateTestObject) Run(ctx *testcontext.Context, t testing.TB, db *metabase.DB, obj metabase.ObjectStream, numberOfSegments byte) metabase.Object
Run runs the test.
type DeleteBucketObjects ¶
type DeleteBucketObjects struct { Opts metabase.DeleteBucketObjects Deleted int64 ErrClass *errs.Class ErrText string }
DeleteBucketObjects is for testing metabase.DeleteBucketObjects.
func (DeleteBucketObjects) Check ¶
func (step DeleteBucketObjects) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type DeleteExpiredObjects ¶
type DeleteExpiredObjects struct { Opts metabase.DeleteExpiredObjects ErrClass *errs.Class ErrText string }
DeleteExpiredObjects is for testing metabase.DeleteExpiredObjects.
func (DeleteExpiredObjects) Check ¶
func (step DeleteExpiredObjects) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type DeleteObjectAnyStatusAllVersions ¶
type DeleteObjectAnyStatusAllVersions struct { Opts metabase.DeleteObjectAnyStatusAllVersions Result metabase.DeleteObjectResult ErrClass *errs.Class ErrText string }
DeleteObjectAnyStatusAllVersions is for testing metabase.DeleteObjectAnyStatusAllVersions.
func (DeleteObjectAnyStatusAllVersions) Check ¶
func (step DeleteObjectAnyStatusAllVersions) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type DeleteObjectExactVersion ¶
type DeleteObjectExactVersion struct { Opts metabase.DeleteObjectExactVersion Result metabase.DeleteObjectResult ErrClass *errs.Class ErrText string }
DeleteObjectExactVersion is for testing metabase.DeleteObjectExactVersion.
func (DeleteObjectExactVersion) Check ¶
func (step DeleteObjectExactVersion) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type DeleteObjectLatestVersion ¶
type DeleteObjectLatestVersion struct { Opts metabase.DeleteObjectLatestVersion Result metabase.DeleteObjectResult ErrClass *errs.Class ErrText string }
DeleteObjectLatestVersion is for testing metabase.DeleteObjectLatestVersion.
func (DeleteObjectLatestVersion) Check ¶
func (step DeleteObjectLatestVersion) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type DeleteObjectsAllVersions ¶
type DeleteObjectsAllVersions struct { Opts metabase.DeleteObjectsAllVersions Result metabase.DeleteObjectResult ErrClass *errs.Class ErrText string }
DeleteObjectsAllVersions is for testing metabase.DeleteObjectsAllVersions.
func (DeleteObjectsAllVersions) Check ¶
func (step DeleteObjectsAllVersions) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type DeletePart ¶ added in v1.30.1
type DeletePart struct { Opts metabase.DeletePart Result []metabase.DeletedSegmentInfo ErrClass *errs.Class ErrText string }
DeletePart is for testing metabase.DeletePart.
func (DeletePart) Check ¶ added in v1.30.1
func (step DeletePart) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type DeletePendingObject ¶
type DeletePendingObject struct { Opts metabase.DeletePendingObject Result metabase.DeleteObjectResult ErrClass *errs.Class ErrText string }
DeletePendingObject is for testing metabase.DeletePendingObject.
func (DeletePendingObject) Check ¶
func (step DeletePendingObject) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type DeleteZombieObjects ¶ added in v1.30.1
type DeleteZombieObjects struct { Opts metabase.DeleteZombieObjects ErrClass *errs.Class ErrText string }
DeleteZombieObjects is for testing metabase.DeleteZombieObjects.
func (DeleteZombieObjects) Check ¶ added in v1.30.1
func (step DeleteZombieObjects) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type EnsureNodeAliases ¶
type EnsureNodeAliases struct { Opts metabase.EnsureNodeAliases ErrClass *errs.Class ErrText string }
EnsureNodeAliases is for testing metabase.EnsureNodeAliases.
func (EnsureNodeAliases) Check ¶
func (step EnsureNodeAliases) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type FinishMoveObject ¶ added in v1.40.3
type FinishMoveObject struct { Opts metabase.FinishMoveObject ErrClass *errs.Class ErrText string }
FinishMoveObject is for testing metabase.FinishMoveObject.
func (FinishMoveObject) Check ¶ added in v1.40.3
func (step FinishMoveObject) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type GetLatestObjectLastSegment ¶
type GetLatestObjectLastSegment struct { Opts metabase.GetLatestObjectLastSegment Result metabase.Segment ErrClass *errs.Class ErrText string }
GetLatestObjectLastSegment is for testing metabase.GetLatestObjectLastSegment.
func (GetLatestObjectLastSegment) Check ¶
func (step GetLatestObjectLastSegment) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type GetObjectExactVersion ¶
type GetObjectExactVersion struct { Opts metabase.GetObjectExactVersion Result metabase.Object ErrClass *errs.Class ErrText string }
GetObjectExactVersion is for testing metabase.GetObjectExactVersion.
func (GetObjectExactVersion) Check ¶
func (step GetObjectExactVersion) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type GetObjectLatestVersion ¶
type GetObjectLatestVersion struct { Opts metabase.GetObjectLatestVersion Result metabase.Object ErrClass *errs.Class ErrText string }
GetObjectLatestVersion is for testing metabase.GetObjectLatestVersion.
func (GetObjectLatestVersion) Check ¶
func (step GetObjectLatestVersion) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type GetSegmentByLocation ¶
type GetSegmentByLocation struct { Opts metabase.GetSegmentByLocation Result metabase.Segment ErrClass *errs.Class ErrText string }
GetSegmentByLocation is for testing metabase.GetSegmentByLocation.
func (GetSegmentByLocation) Check ¶
func (step GetSegmentByLocation) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type GetSegmentByOffset ¶
type GetSegmentByOffset struct { Opts metabase.GetSegmentByOffset Result metabase.Segment ErrClass *errs.Class ErrText string }
GetSegmentByOffset is for testing metabase.GetSegmentByOffset.
func (GetSegmentByOffset) Check ¶
func (step GetSegmentByOffset) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type GetSegmentByPosition ¶
type GetSegmentByPosition struct { Opts metabase.GetSegmentByPosition Result metabase.Segment ErrClass *errs.Class ErrText string }
GetSegmentByPosition is for testing metabase.GetSegmentByPosition.
func (GetSegmentByPosition) Check ¶
func (step GetSegmentByPosition) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type GetStreamPieceCountByNodeID ¶
type GetStreamPieceCountByNodeID struct { Opts metabase.GetStreamPieceCountByNodeID Result map[storj.NodeID]int64 ErrClass *errs.Class ErrText string }
GetStreamPieceCountByNodeID is for testing metabase.GetStreamPieceCountByNodeID.
func (GetStreamPieceCountByNodeID) Check ¶
func (step GetStreamPieceCountByNodeID) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type GetTableStats ¶ added in v1.32.2
type GetTableStats struct { Opts metabase.GetTableStats Result metabase.TableStats ErrClass *errs.Class ErrText string }
GetTableStats is for testing metabase.GetTableStats.
func (GetTableStats) Check ¶ added in v1.32.2
func (step GetTableStats) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB) metabase.TableStats
Check runs the test.
type InvalidObjectLocation ¶
type InvalidObjectLocation struct { Name string ObjectLocation metabase.ObjectLocation ErrClass *errs.Class ErrText string }
InvalidObjectLocation contains info about an invalid object location.
func InvalidObjectLocations ¶
func InvalidObjectLocations(base metabase.ObjectLocation) []InvalidObjectLocation
InvalidObjectLocations returns a list of invalid object locations.
type InvalidObjectStream ¶
type InvalidObjectStream struct { Name string ObjectStream metabase.ObjectStream ErrClass *errs.Class ErrText string }
InvalidObjectStream contains info about an invalid stream.
func InvalidObjectStreams ¶
func InvalidObjectStreams(base metabase.ObjectStream) []InvalidObjectStream
InvalidObjectStreams returns a list of invalid object streams.
type InvalidSegmentLocation ¶
type InvalidSegmentLocation struct { Name string SegmentLocation metabase.SegmentLocation ErrClass *errs.Class ErrText string }
InvalidSegmentLocation contains info about an invalid segment location.
func InvalidSegmentLocations ¶
func InvalidSegmentLocations(base metabase.SegmentLocation) []InvalidSegmentLocation
InvalidSegmentLocations returns a list of invalid segment locations.
type IterateCollector ¶
type IterateCollector []metabase.ObjectEntry
IterateCollector is for testing metabase.IterateCollector.
func (*IterateCollector) Add ¶
func (coll *IterateCollector) Add(ctx context.Context, it metabase.ObjectsIterator) error
Add adds object entries from iterator to the collection.
type IterateLoopObjects ¶
type IterateLoopObjects struct { Opts metabase.IterateLoopObjects Result []metabase.LoopObjectEntry ErrClass *errs.Class ErrText string }
IterateLoopObjects is for testing metabase.IterateLoopObjects.
func (IterateLoopObjects) Check ¶
func (step IterateLoopObjects) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type IterateLoopSegments ¶ added in v1.31.1
type IterateLoopSegments struct { Opts metabase.IterateLoopSegments Result []metabase.LoopSegmentEntry ErrClass *errs.Class ErrText string }
IterateLoopSegments is for testing metabase.IterateLoopSegments.
func (IterateLoopSegments) Check ¶ added in v1.31.1
func (step IterateLoopSegments) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type IterateObjects ¶
type IterateObjects struct { Opts metabase.IterateObjects Result []metabase.ObjectEntry ErrClass *errs.Class ErrText string }
IterateObjects is for testing metabase.IterateObjects.
func (IterateObjects) Check ¶
func (step IterateObjects) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type IterateObjectsWithStatus ¶
type IterateObjectsWithStatus struct { Opts metabase.IterateObjectsWithStatus Result []metabase.ObjectEntry ErrClass *errs.Class ErrText string }
IterateObjectsWithStatus is for testing metabase.IterateObjectsWithStatus.
func (IterateObjectsWithStatus) Check ¶
func (step IterateObjectsWithStatus) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type IteratePendingObjectsByKey ¶
type IteratePendingObjectsByKey struct { Opts metabase.IteratePendingObjectsByKey Result []metabase.ObjectEntry ErrClass *errs.Class ErrText string }
IteratePendingObjectsByKey is for testing metabase.IteratePendingObjectsByKey.
func (IteratePendingObjectsByKey) Check ¶
func (step IteratePendingObjectsByKey) Check(ctx *testcontext.Context, t *testing.T, db *metabase.DB)
Check runs the test.
type ListNodeAliases ¶
ListNodeAliases is for testing metabase.ListNodeAliases.
func (ListNodeAliases) Check ¶
func (step ListNodeAliases) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB) []metabase.NodeAliasEntry
Check runs the test.
type ListSegments ¶
type ListSegments struct { Opts metabase.ListSegments Result metabase.ListSegmentsResult ErrClass *errs.Class ErrText string }
ListSegments is for testing metabase.ListSegments.
func (ListSegments) Check ¶
func (step ListSegments) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type ListStreamPositions ¶
type ListStreamPositions struct { Opts metabase.ListStreamPositions Result metabase.ListStreamPositionsResult ErrClass *errs.Class ErrText string }
ListStreamPositions is for testing metabase.ListStreamPositions.
func (ListStreamPositions) Check ¶
func (step ListStreamPositions) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type LoopIterateCollector ¶
type LoopIterateCollector []metabase.LoopObjectEntry
LoopIterateCollector is for testing metabase.LoopIterateCollector.
func (*LoopIterateCollector) Add ¶
func (coll *LoopIterateCollector) Add(ctx context.Context, it metabase.LoopObjectsIterator) error
Add adds object entries from iterator to the collection.
type UpdateObjectMetadata ¶
type UpdateObjectMetadata struct { Opts metabase.UpdateObjectMetadata ErrClass *errs.Class ErrText string }
UpdateObjectMetadata is for testing metabase.UpdateObjectMetadata.
func (UpdateObjectMetadata) Check ¶
func (step UpdateObjectMetadata) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.
type UpdateSegmentPieces ¶
type UpdateSegmentPieces struct { Opts metabase.UpdateSegmentPieces ErrClass *errs.Class ErrText string }
UpdateSegmentPieces is for testing metabase.UpdateSegmentPieces.
func (UpdateSegmentPieces) Check ¶
func (step UpdateSegmentPieces) Check(ctx *testcontext.Context, t testing.TB, db *metabase.DB)
Check runs the test.