Skip to content

Commit c4c44f0

Browse files
CLDSRV-835: Add newlines to log lines
1 parent eedcd6b commit c4c44f0

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

tests/functional/aws-node-sdk/test/object/copyPart.js

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ describe('Object Part Copy', () => {
307307
})).then(initiateRes => {
308308
sourceMpuId = initiateRes.UploadId;
309309
}).catch(err => {
310-
process.stdout.write(`Error initiating MPU ' +
311-
'in MPU beforeEach: ${err}\n`);
310+
process.stdout.write(`Error initiating MPU in MPU beforeEach: ${err}\n`);
312311
throw err;
313312
}).then(() => {
314313
const partUploads = [];
@@ -339,14 +338,13 @@ describe('Object Part Copy', () => {
339338
PartNumber: i,
340339
});
341340
}
342-
process.stdout.write('about to put parts');
341+
process.stdout.write('about to put parts\n');
343342
return Promise.all(partUploads);
344343
}).catch(err => {
345-
process.stdout.write(`Error putting parts in ' +
346-
'MPU beforeEach: ${err}\n`);
344+
process.stdout.write(`Error putting parts in MPU beforeEach: ${err}\n`);
347345
throw err;
348346
}).then(() => {
349-
process.stdout.write('completing mpu');
347+
process.stdout.write('completing mpu\n');
350348
return s3.send(new CompleteMultipartUploadCommand({
351349
Bucket: sourceBucketName,
352350
Key: sourceMpuKey,
@@ -356,7 +354,7 @@ describe('Object Part Copy', () => {
356354
},
357355
}));
358356
}).then(() => {
359-
process.stdout.write('finished completing mpu');
357+
process.stdout.write('finished completing mpu\n');
360358
}).catch(err => {
361359
process.stdout.write(`Error in MPU beforeEach: ${err}\n`);
362360
throw err;
@@ -377,7 +375,7 @@ describe('Object Part Copy', () => {
377375

378376
it('should copy a part from a source bucket to a different ' +
379377
'destination bucket', () => {
380-
process.stdout.write('Entered first mpu test');
378+
process.stdout.write('Entered first mpu test\n');
381379
return s3.send(new UploadPartCopyCommand({
382380
Bucket: destBucketName,
383381
Key: destObjName,
@@ -393,7 +391,7 @@ describe('Object Part Copy', () => {
393391

394392
it('should copy two parts from a source bucket to a different ' +
395393
'destination bucket and complete the MPU', () => {
396-
process.stdout.write('Putting first part in MPU test');
394+
process.stdout.write('Putting first part in MPU test\n');
397395
return s3.send(new UploadPartCopyCommand({
398396
Bucket: destBucketName,
399397
Key: destObjName,
@@ -404,7 +402,7 @@ describe('Object Part Copy', () => {
404402
assert.strictEqual(res.CopyPartResult.ETag, totalMpuObjectHash);
405403
assert(res.CopyPartResult.LastModified);
406404
}).then(() => {
407-
process.stdout.write('Putting second part in MPU test');
405+
process.stdout.write('Putting second part in MPU test\n');
408406
return s3.send(new UploadPartCopyCommand({
409407
Bucket: destBucketName,
410408
Key: destObjName,
@@ -415,7 +413,7 @@ describe('Object Part Copy', () => {
415413
assert.strictEqual(res.CopyPartResult.ETag, totalMpuObjectHash);
416414
assert(res.CopyPartResult.LastModified);
417415
}).then(() => {
418-
process.stdout.write('Completing MPU');
416+
process.stdout.write('Completing MPU\n');
419417
return s3.send(new CompleteMultipartUploadCommand({
420418
Bucket: destBucketName,
421419
Key: destObjName,
@@ -443,7 +441,7 @@ describe('Object Part Copy', () => {
443441
it('should copy two parts with range headers from a source ' +
444442
'bucket to a different destination bucket and ' +
445443
'complete the MPU', () => {
446-
process.stdout.write('Putting first part in MPU range test');
444+
process.stdout.write('Putting first part in MPU range test\n');
447445
const part1ETag = '"b1e0d096c8f0670c5367d131e392b84a"';
448446
const part2ETag = '"a2468d5c0ec2d4d5fc13b73beb63080a"';
449447
// combined ETag returned by AWS (combination of part ETags
@@ -461,7 +459,7 @@ describe('Object Part Copy', () => {
461459
assert.strictEqual(res.CopyPartResult.ETag, part1ETag);
462460
assert(res.CopyPartResult.LastModified);
463461
}).then(() => {
464-
process.stdout.write('Putting second part in MPU test');
462+
process.stdout.write('Putting second part in MPU test\n');
465463
return s3.send(new UploadPartCopyCommand({
466464
Bucket: destBucketName,
467465
Key: destObjName,
@@ -473,7 +471,7 @@ describe('Object Part Copy', () => {
473471
assert.strictEqual(res.CopyPartResult.ETag, part2ETag);
474472
assert(res.CopyPartResult.LastModified);
475473
}).then(() => {
476-
process.stdout.write('Completing MPU');
474+
process.stdout.write('Completing MPU\n');
477475
return s3.send(new CompleteMultipartUploadCommand({
478476
Bucket: destBucketName,
479477
Key: destObjName,
@@ -489,7 +487,7 @@ describe('Object Part Copy', () => {
489487
assert.strictEqual(res.Key, destObjName);
490488
assert.strictEqual(res.ETag, finalCombinedETag);
491489
}).then(() => {
492-
process.stdout.write('Getting new object');
490+
process.stdout.write('Getting new object\n');
493491
return s3.send(new GetObjectCommand({
494492
Bucket: destBucketName,
495493
Key: destObjName,
@@ -508,7 +506,7 @@ describe('Object Part Copy', () => {
508506
it('should overwrite an existing part by copying a part', () => {
509507
// AWS response etag for this completed MPU
510508
const finalObjETag = '"db77ebbae9e9f5a244a26b86193ad818-1"';
511-
process.stdout.write('Putting first part in MPU test');
509+
process.stdout.write('Putting first part in MPU test\n');
512510
return s3.send(new UploadPartCopyCommand({
513511
Bucket: destBucketName,
514512
Key: destObjName,
@@ -519,7 +517,7 @@ describe('Object Part Copy', () => {
519517
assert.strictEqual(res.CopyPartResult.ETag, totalMpuObjectHash);
520518
assert(res.CopyPartResult.LastModified);
521519
}).then(() => {
522-
process.stdout.write('Overwriting first part in MPU test');
520+
process.stdout.write('Overwriting first part in MPU test\n');
523521
return s3.send(new UploadPartCopyCommand({
524522
Bucket: destBucketName,
525523
Key: destObjName,
@@ -530,7 +528,7 @@ describe('Object Part Copy', () => {
530528
).then(res => {
531529
assert.strictEqual(res.CopyPartResult.ETag, etag);
532530
assert(res.CopyPartResult.LastModified);
533-
process.stdout.write('Completing MPU');
531+
process.stdout.write('Completing MPU\n');
534532
return s3.send(new CompleteMultipartUploadCommand({
535533
Bucket: destBucketName,
536534
Key: destObjName,
@@ -547,7 +545,7 @@ describe('Object Part Copy', () => {
547545
assert.strictEqual(res.ETag, finalObjETag);
548546
}).then(() => {
549547
process.stdout.write('Getting object put by MPU with ' +
550-
'overwrite part');
548+
'overwrite part\n');
551549
return s3.send(new GetObjectCommand({
552550
Bucket: destBucketName,
553551
Key: destObjName,
@@ -564,7 +562,7 @@ describe('Object Part Copy', () => {
564562
it('should not corrupt object if overwriting an existing part by copying a part ' +
565563
'while the MPU is being completed', async () => {
566564
const finalObjETag = '"db77ebbae9e9f5a244a26b86193ad818-1"';
567-
process.stdout.write('Putting first part in MPU test"');
565+
process.stdout.write('Putting first part in MPU test\n');
568566
const randomDestObjName = `copycatobject${Math.floor(Math.random() * 100000)}`;
569567

570568
const initiateRes = await s3.send(new CreateMultipartUploadCommand({
@@ -584,7 +582,7 @@ describe('Object Part Copy', () => {
584582
assert(res.CopyPartResult.LastModified);
585583

586584
process.stdout.write(
587-
'Overwriting first part in MPU test and completing MPU at the same time',
585+
'Overwriting first part in MPU test and completing MPU at the same time\n',
588586
);
589587
const [completeRes, uploadRes] = await Promise.all([
590588
s3.send(new CompleteMultipartUploadCommand({
@@ -623,7 +621,7 @@ describe('Object Part Copy', () => {
623621
assert.strictEqual(completeRes.Key, randomDestObjName);
624622
assert.strictEqual(completeRes.ETag, finalObjETag);
625623
process.stdout.write(
626-
'Getting object put by MPU with ' + 'overwrite part',
624+
'Getting object put by MPU with overwrite part\n',
627625
);
628626
const resGet = await s3
629627
.send(new GetObjectCommand({
@@ -761,15 +759,15 @@ describe('Object Part Copy', () => {
761759
let otherAccountUploadId;
762760

763761
beforeEach(() => {
764-
process.stdout.write('In other account before each');
762+
process.stdout.write('In other account before each\n');
765763
return otherAccountS3.send(new CreateBucketCommand({ Bucket:
766764
otherAccountBucket }))
767765
.catch(err => {
768766
process.stdout.write('Error creating other account ' +
769767
`bucket: ${err}\n`);
770768
throw err;
771769
}).then(() => {
772-
process.stdout.write('Initiating other account MPU');
770+
process.stdout.write('Initiating other account MPU\n');
773771
return otherAccountS3.send(new CreateMultipartUploadCommand({
774772
Bucket: otherAccountBucket,
775773
Key: otherAccountKey,

0 commit comments

Comments
 (0)