MCPcopy Index your code
hub / github.com/scality/cloudserver / createObjectWithMetadata

Function createObjectWithMetadata

tests/unit/api/objectGetAttributes.js:356–372  ·  view source on GitHub ↗
(metadata = {})

Source from the content-addressed store, hash-verified

354 });
355
356 const createObjectWithMetadata = async (metadata = {}) => {
357 const testPutObjectRequest = new DummyRequest(
358 {
359 bucketName,
360 namespace,
361 objectKey: objectName,
362 headers: {
363 'content-length': `${postBody.length}`,
364 ...metadata,
365 },
366 parsedContentLength: postBody.length,
367 url: `/${bucketName}/${objectName}`,
368 },
369 postBody,
370 );
371 await objectPutAsync(authInfo, testPutObjectRequest, undefined, log);
372 };
373
374 it('should return specific user metadata when requested', async () => {
375 await createObjectWithMetadata({

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected