From a3f468bebe256151a16abaf3738aa04167f86ee4 Mon Sep 17 00:00:00 2001 From: Taylor McKinnon Date: Thu, 7 Dec 2023 09:25:07 -0800 Subject: [PATCH] support DelimiterVersions in bucketd mock --- tests/utils/mock/BucketD.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/utils/mock/BucketD.js b/tests/utils/mock/BucketD.js index bd65d325..6f4012e1 100644 --- a/tests/utils/mock/BucketD.js +++ b/tests/utils/mock/BucketD.js @@ -112,6 +112,15 @@ class BucketD { return body; } + _getBucketVersionsResponse(bucketName) { + const body = { + CommonPrefixes: [], + IsTruncated: false, + Versions: this._bucketContent[bucketName] || [], + }; + return body; + } + _getShadowBucketOverviewResponse(bucketName) { const mpus = (this._bucketContent[bucketName] || []).map(o => ({ key: o.key, @@ -137,6 +146,8 @@ class BucketD { || req.query.listingType === 'Delimiter' ) { req.body = this._getBucketResponse(bucketName); + } else if (req.query.listingType === 'DelimiterVersions') { + req.body = this._getBucketVersionResponse(bucketName); } // v2 reindex uses `Basic` listing type for everything