Skip to content
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scality/cloudserverclient",
"version": "1.0.5",
"version": "1.0.6",
"engines": {
"node": ">=20"
},
Expand Down Expand Up @@ -55,7 +55,7 @@
"typescript-eslint": "^8.49.0"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.896.0",
"@aws-sdk/client-s3": "^3.1009.0",
"JSONStream": "^1.3.5",
"fast-xml-parser": "^4.3.2"
},
Expand Down
10 changes: 6 additions & 4 deletions src/commands/s3Extended/listObjectsV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ export class ListObjectsV2ExtendedCommand extends ListObjectsV2Command {
constructor(input: ListObjectsV2ExtendedInput) {
super(input);

this.middlewareStack.add(
extendCommandWithExtraParametersMiddleware(input.Query),
{ step: 'build', name: 'extendCommandWithExtraParameters' }
);
if (input.Query) {
this.middlewareStack.add(
extendCommandWithExtraParametersMiddleware(input.Query),
{ step: 'build', name: 'extendCommandWithExtraParameters' }
);
}

if (input.ObjectAttributes?.length) {
const captured = { xml: '' };
Expand Down
6 changes: 5 additions & 1 deletion tests/commands/s3Extended/listObjectsV2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describeForMongoBackend('ListObjectsV2Extended', () => {
assert.strictEqual(getData2.Contents[0].Key, key2ndObject);
});

describe.skip('ListObjectsV2 with ObjectAttributes', () => {
describe('ListObjectsV2 with ObjectAttributes', () => {
const metaKey1 = `${testConfig.objectKey}-listv2-meta1`;
const metaKey2 = `${testConfig.objectKey}-listv2-meta2`;

Expand All @@ -71,6 +71,7 @@ describeForMongoBackend('ListObjectsV2Extended', () => {
it('should list objects with a single user metadata key', async () => {
const result = await s3client.send(new ListObjectsV2ExtendedCommand({
Bucket: testConfig.bucketName,
Prefix: `${testConfig.objectKey}-listv2-meta`,
ObjectAttributes: ['x-amz-meta-foo'],
})) as ListObjectsV2ExtendedOutput;

Expand Down Expand Up @@ -117,6 +118,7 @@ describeForMongoBackend('ListObjectsV2Extended', () => {
it('should list objects with non-existing user metadata key', async () => {
const result = await s3client.send(new ListObjectsV2ExtendedCommand({
Bucket: testConfig.bucketName,
Prefix: `${testConfig.objectKey}-listv2-meta`,
ObjectAttributes: ['x-amz-meta-nonexistent'],
})) as ListObjectsV2ExtendedOutput;

Expand All @@ -130,6 +132,7 @@ describeForMongoBackend('ListObjectsV2Extended', () => {
it('should list objects with RestoreStatus combined with user metadata', async () => {
const result = await s3client.send(new ListObjectsV2ExtendedCommand({
Bucket: testConfig.bucketName,
Prefix: `${testConfig.objectKey}-listv2-meta`,
ObjectAttributes: ['RestoreStatus', 'x-amz-meta-foo'],
})) as ListObjectsV2ExtendedOutput;

Expand All @@ -143,6 +146,7 @@ describeForMongoBackend('ListObjectsV2Extended', () => {
it('should list objects with RestoreStatus combined with non-existing user metadata', async () => {
const result = await s3client.send(new ListObjectsV2ExtendedCommand({
Bucket: testConfig.bucketName,
Prefix: `${testConfig.objectKey}-listv2-meta`,
ObjectAttributes: ['RestoreStatus', 'x-amz-meta-nonexistent'],
})) as ListObjectsV2ExtendedOutput;

Expand Down
Loading
Loading