mirror of
https://github.com/minio/minio.git
synced 2025-01-27 14:43:18 -05:00
fix race in TestComputeActions test (#13564)
This commit is contained in:
parent
73b74c94a1
commit
3dfcca68e6
@ -394,17 +394,17 @@ func TestComputeActions(t *testing.T) {
|
|||||||
{
|
{
|
||||||
inputConfig: `<BucketLifecycleConfiguration><Rule><Filter></Filter><Status>Enabled</Status><Transition><Days>0</Days><StorageClass>S3TIER-1</StorageClass></Transition></Rule></BucketLifecycleConfiguration>`,
|
inputConfig: `<BucketLifecycleConfiguration><Rule><Filter></Filter><Status>Enabled</Status><Transition><Days>0</Days><StorageClass>S3TIER-1</StorageClass></Transition></Rule></BucketLifecycleConfiguration>`,
|
||||||
objectName: "foodir/fooobject",
|
objectName: "foodir/fooobject",
|
||||||
objectModTime: time.Now().UTC(), // Created now
|
objectModTime: time.Now().Add(-1 * time.Nanosecond).UTC(), // Created now
|
||||||
expectedAction: TransitionAction,
|
expectedAction: TransitionAction,
|
||||||
},
|
},
|
||||||
// Should transition immediately when NoncurrentVersion Transition days is zero
|
// Should transition immediately when NoncurrentVersion Transition days is zero
|
||||||
{
|
{
|
||||||
inputConfig: `<BucketLifecycleConfiguration><Rule><Filter></Filter><Status>Enabled</Status><NoncurrentVersionTransition><NoncurrentDays>0</NoncurrentDays><StorageClass>S3TIER-1</StorageClass></NoncurrentVersionTransition></Rule></BucketLifecycleConfiguration>`,
|
inputConfig: `<BucketLifecycleConfiguration><Rule><Filter></Filter><Status>Enabled</Status><NoncurrentVersionTransition><NoncurrentDays>0</NoncurrentDays><StorageClass>S3TIER-1</StorageClass></NoncurrentVersionTransition></Rule></BucketLifecycleConfiguration>`,
|
||||||
objectName: "foodir/fooobject",
|
objectName: "foodir/fooobject",
|
||||||
objectModTime: time.Now().UTC(), // Created now
|
objectModTime: time.Now().Add(-1 * time.Nanosecond).UTC(), // Created now
|
||||||
expectedAction: TransitionVersionAction,
|
expectedAction: TransitionVersionAction,
|
||||||
isNoncurrent: true,
|
isNoncurrent: true,
|
||||||
objectSuccessorModTime: time.Now().UTC(),
|
objectSuccessorModTime: time.Now().Add(-1 * time.Nanosecond).UTC(),
|
||||||
versionID: uuid.New().String(),
|
versionID: uuid.New().String(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user