diff --git a/lib/api/bucketGet.js b/lib/api/bucketGet.js index 165c4321f0..cd28a7aedf 100644 --- a/lib/api/bucketGet.js +++ b/lib/api/bucketGet.js @@ -218,7 +218,8 @@ function processMasterVersions(bucketName, listParams, list) { } else if (p.tag !== 'NextMarker' && p.tag !== 'EncodingType' && p.tag !== 'Delimiter' && - p.tag !== 'StartAfter') { + p.tag !== 'StartAfter' && + p.tag !== 'NextContinuationToken') { xml.push(`<${p.tag}/>`); } }); diff --git a/tests/unit/api/bucketGet.js b/tests/unit/api/bucketGet.js index dbfdb0494f..4a038d92fc 100644 --- a/tests/unit/api/bucketGet.js +++ b/tests/unit/api/bucketGet.js @@ -313,6 +313,9 @@ describe('bucketGet API V2', () => { assert.strictEqual(keyCount, keysReturned); // assert the results from tests test.assertion(result); + if (result.ListBucketResult.IsTruncated && result.ListBucketResult.IsTruncated[0] === 'false') { + assert.strictEqual(result.ListBucketResult.NextContinuationToken, undefined); + } done(); }); }); diff --git a/tests/unit/api/objectGet.js b/tests/unit/api/objectGet.js index bf7c24fde4..582abfe112 100644 --- a/tests/unit/api/objectGet.js +++ b/tests/unit/api/objectGet.js @@ -99,7 +99,8 @@ describe('objectGet API', () => { url: `/${bucketName}/${objectName}`, }, postBody); - const testDate = new Date(2022, 6, 3).toISOString(); + const threeDaysMilliSecs = 3 * 24 * 60 * 60 * 1000; + const testDate = new Date(Date.now() + threeDaysMilliSecs).toISOString(); it('should get the object metadata with valid retention info', done => { bucketPut(authInfo, testPutBucketRequestObjectLock, log, () => {