Compare commits

...

1 Commits

Author SHA1 Message Date
bbuchanan9 ca68b6cec0 bugfix: ZENKO-1583 Non-current version transition 2019-03-20 22:45:20 -07:00
2 changed files with 29 additions and 3 deletions

View File

@ -19,7 +19,7 @@
}, },
"homepage": "https://github.com/scality/S3#readme", "homepage": "https://github.com/scality/S3#readme",
"dependencies": { "dependencies": {
"arsenal": "github:scality/arsenal#b552958", "arsenal": "github:scality/arsenal#15fa793",
"async": "~2.5.0", "async": "~2.5.0",
"aws-sdk": "2.28.0", "aws-sdk": "2.28.0",
"azure-storage": "^2.1.0", "azure-storage": "^2.1.0",

View File

@ -342,7 +342,8 @@ describe('aws-sdk test put bucket lifecycle', () => {
}); });
}); });
describe('with NoncurrentVersionTransitions', () => { // NoncurrentVersionTransitions not implemented
describe.skip('with NoncurrentVersionTransitions', () => {
// Get lifecycle request params with NoncurrentVersionTransitions. // Get lifecycle request params with NoncurrentVersionTransitions.
function getParams(noncurrentVersionTransitions) { function getParams(noncurrentVersionTransitions) {
const rule = { const rule = {
@ -593,7 +594,9 @@ describe('aws-sdk test put bucket lifecycle', () => {
}); });
}); });
describe('with NoncurrentVersionTransitions and Transitions', () => { // NoncurrentVersionTransitions not implemented
describe.skip('with NoncurrentVersionTransitions and Transitions',
() => {
it('should allow config', done => { it('should allow config', done => {
const params = { const params = {
Bucket: bucket, Bucket: bucket,
@ -619,5 +622,28 @@ describe('aws-sdk test put bucket lifecycle', () => {
}); });
}); });
}); });
it('should not allow config when specifying ' +
'NoncurrentVersionTransitions', done => {
const params = {
Bucket: bucket,
LifecycleConfiguration: {
Rules: [{
ID: 'test',
Status: 'Enabled',
Prefix: '',
NoncurrentVersionTransitions: [{
NoncurrentDays: 1,
StorageClass: 'us-east-2',
}],
}],
},
};
s3.putBucketLifecycleConfiguration(params, err => {
assert.strictEqual(err.statusCode, 501);
assert.strictEqual(err.code, 'NotImplemented');
done();
});
});
}); });
}); });