Skip to content

Commit

Permalink
support DelimiterVersions in bucketd mock
Browse files Browse the repository at this point in the history
  • Loading branch information
tmacro committed Dec 7, 2023
1 parent 687277a commit a3f468b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/utils/mock/BucketD.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit a3f468b

Please sign in to comment.