Skip to content

Commit

Permalink
fix: putBucketLifecycle add ColdArchive and DeepColdArchive
Browse files Browse the repository at this point in the history
  • Loading branch information
csg01123119 committed Oct 7, 2023
1 parent 1435d27 commit 609d60f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions test/node/bucket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ describe('test/bucket.test.js', () => {
status: 'Enabled',
transition: {
days: 20,
storageClass: 'DeepColdArchive'
storageClass: 'ColdArchive'
},
tag: {
key: 'test',
Expand All @@ -873,6 +873,22 @@ describe('test/bucket.test.js', () => {
}
]);
assert.equal(putresult3.res.status, 200);
const putresult4 = await store.putBucketLifecycle(bucket, [
{
id: 'transition',
prefix: 'logs/',
status: 'Enabled',
transition: {
days: 20,
storageClass: 'DeepColdArchive'
},
tag: {
key: 'test',
value: '123'
}
}
]);
assert.equal(putresult4.res.status, 200);
});

it('should put the lifecycle with expiration and Tag', async () => {
Expand Down Expand Up @@ -1003,7 +1019,7 @@ describe('test/bucket.test.js', () => {
]);
assert(false);
} catch (error) {
assert(error.message.includes('IA or Archive'));
assert(error.message.includes('IAArchive'));
}
});

Expand Down

0 comments on commit 609d60f

Please sign in to comment.