Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport to rel/7.0: missing mpu bucket prefix [S3C-632] #815

Merged
merged 2 commits into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ const constants = {
oldSplitter: 'splitterfornow',
usersBucket: 'users..bucket',
oldUsersBucket: 'namespaceusersbucket',
// MPU Bucket Prefix is used to create the name of the shadow
// bucket used for multipart uploads. There is one shadow mpu
// bucket per bucket and its name is the mpuBucketPrefix followed
// by the name of the final destination bucket for the object
// once the multipart upload is complete.
mpuBucketPrefix: 'mpuShadowBucket',
blacklistedPrefixes: { bucket: [], object: [] },
// PublicId is used as the canonicalID for a request that contains
// no authentication information. Requestor can access
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@
"homepage": "https://github.com/scality/S3#readme",
"dependencies": {
"aws-sdk": "2.28.0",
"arsenal": "scality/Arsenal",
"arsenal": "scality/Arsenal#rel/7.0",
"async": "~1.4.2",
"bucketclient": "scality/bucketclient",
"bucketclient": "scality/bucketclient#rel/7.0",
"commander": "^2.9.0",
"ioredis": "2.4.0",
"node-uuid": "^1.4.3",
"npm-run-all": "~4.0.2",
"sproxydclient": "scality/sproxydclient",
"utapi": "scality/utapi",
"sproxydclient": "scality/sproxydclient#rel/7.0",
"utapi": "scality/utapi#rel/7.0",
"utf8": "~2.1.1",
"vaultclient": "scality/vaultclient",
"werelogs": "scality/werelogs",
"vaultclient": "scality/vaultclient#rel/7.0",
"werelogs": "scality/werelogs#rel/7.0",
"xml2js": "~0.4.16"
},
"devDependencies": {
"bluebird": "^3.3.1",
"eslint": "^2.4.0",
"eslint-config-airbnb": "^6.0.0",
"eslint-config-scality": "scality/Guidelines",
"eslint-config-scality": "scality/Guidelines#rel/7.0",
"istanbul": "1.0.0-alpha.2",
"istanbul-api": "1.0.0-alpha.13",
"lolex": "^1.4.0",
"mocha": "^2.3.4",
"mocha-junit-reporter": "1.11.1",
"node-mocks-http": "^1.5.2",
"s3blaster": "scality/s3blaster",
"s3blaster": "scality/s3blaster#rel/7.0",
"tv4": "^1.2.7"
},
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/api/multipartUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ describe('Multipart Upload API', () => {
cleanup();
});

it('mpuBucketPrefix should be a defined constant', () => {
assert(constants.mpuBucketPrefix,
'Expected mpuBucketPrefix to be defined');
});

it('should initiate a multipart upload', done => {
bucketPut(authInfo, bucketPutRequest, log, () => {
Expand All @@ -107,6 +111,8 @@ describe('Multipart Upload API', () => {
assert.strictEqual(json.InitiateMultipartUploadResult
.Key[0], objectKey);
assert(json.InitiateMultipartUploadResult.UploadId[0]);
assert(metadata.buckets.get(mpuBucket)._name,
mpuBucket);
const mpuKeys = metadata.keyMaps.get(mpuBucket);
assert.strictEqual(mpuKeys.size, 1);
assert(mpuKeys.keys().next().value
Expand Down