{ "$schema": "../schema/vector.schema.json", "vectors": [ { "id": "copy-0001", "group": "copy", "kind": "api", "title": "CopyObject with non-matching x-amz-copy-source-if-match returns PreconditionFailed", "tags": [ "tier-1", "copy", "conditional", "errors", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L14041", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo", "body": "bar" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar", "CopySource": "${res.b1.name}/foo", "CopySourceIfMatch": "ABCORZ" }, "expect": { "status": 412, "error": "PreconditionFailed" } } } ] }, { "id": "copy-0002", "group": "copy", "kind": "api", "title": "CopyObject with matching x-amz-copy-source-if-match succeeds", "tags": [ "tier-1", "copy", "conditional", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L14028", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo", "body": "bar" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar", "CopySource": "${res.b1.name}/foo", "CopySourceIfMatch": "${res.o1.etag}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar" }, "expect": { "body": "bar" } } } ] }, { "id": "copy-0003", "group": "copy", "kind": "api", "title": "CopyObject with non-matching x-amz-copy-source-if-none-match succeeds", "tags": [ "tier-1", "copy", "conditional", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L14066", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo", "body": "bar" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar", "CopySource": "${res.b1.name}/foo", "CopySourceIfNoneMatch": "ABCORZ" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar" }, "expect": { "body": "bar" } } } ] }, { "id": "copy-0004", "group": "copy", "kind": "api", "title": "CopyObject with matching x-amz-copy-source-if-none-match returns PreconditionFailed", "tags": [ "tier-1", "copy", "conditional", "errors", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L14054", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo", "body": "bar" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar", "CopySource": "${res.b1.name}/foo", "CopySourceIfNoneMatch": "${res.o1.etag}" }, "expect": { "status": 412, "error": "PreconditionFailed" } } } ] }, { "id": "copy-0005", "group": "copy", "kind": "api", "title": "Copy a 16 MiB object within a bucket", "tags": [ "tier-1", "copy", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5529", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "obj1", "body": { "$data": "zeros16m" } } } ], "data": { "zeros16m": { "$pattern": { "patternBase64": "AA==", "size": 16777216 } } }, "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "obj2", "CopySource": "${res.b1.name}/obj1" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "obj2" }, "expect": { "response": { "ContentLength": 16777216 } } } } ] }, { "id": "copy-0006", "group": "copy", "kind": "api", "title": "Copy from a non-existent source bucket returns 404", "tags": [ "tier-1", "copy", "errors", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5721", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}-fake/foo123bar" }, "expect": { "status": 404 } } } ] }, { "id": "copy-0007", "group": "copy", "kind": "api", "title": "CopyObject applies a canned public-read ACL to the destination", "tags": [ "tier-1", "copy", "acl", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5659", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": "foo" } }, { "$credential": { "handle": "alt" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar", "ACL": "public-read" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo" }, "identity": "alt" } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar", "CopySource": "${res.b1.name}/bar321foo", "ACL": "public-read", "Metadata": { "abc": "def" }, "MetadataDirective": "REPLACE" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar" }, "identity": "alt" } } ] }, { "id": "copy-0008", "group": "copy", "kind": "api", "title": "Copy an object to a different bucket", "tags": [ "tier-1", "copy", "source:ceph-s3-tests", "source:msst-s3" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5603", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$bucket": { "handle": "b2" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": "foo" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b2.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b2.name}", "Key": "bar321foo" }, "expect": { "body": "foo" } } } ] }, { "id": "copy-0009", "group": "copy", "kind": "api", "title": "Copy from another user's private object into own bucket is denied", "tags": [ "tier-2", "copy", "errors", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5619", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": "foo" } }, { "$credential": { "handle": "alt" } } ], "steps": [ { "$operation": { "name": "CreateBucket", "params": { "Bucket": "${res.b1.name}-alt" }, "identity": "alt" } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}-alt", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar" }, "identity": "alt", "expect": { "status": 403 } } } ] }, { "id": "copy-0010", "group": "copy", "kind": "api", "title": "Grantee with FULL_CONTROL on object and bucket can copy within the owner's bucket", "tags": [ "tier-3", "copy", "acl", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5636", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": "foo" } }, { "$credential": { "handle": "alt" } } ], "steps": [ { "$operation": { "name": "GetObjectAcl", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar" }, "capture": { "ownerId": "Owner.ID" } } }, { "$operation": { "name": "PutObjectAcl", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar", "AccessControlPolicy": { "Grants": [ { "Grantee": { "ID": "${cap.ownerId}", "Type": "CanonicalUser" }, "Permission": "FULL_CONTROL" }, { "Grantee": { "ID": "${res.alt.canonicalId}", "Type": "CanonicalUser" }, "Permission": "FULL_CONTROL" } ], "Owner": { "ID": "${cap.ownerId}" } } } } }, { "$operation": { "name": "PutBucketAcl", "params": { "Bucket": "${res.b1.name}", "AccessControlPolicy": { "Grants": [ { "Grantee": { "ID": "${cap.ownerId}", "Type": "CanonicalUser" }, "Permission": "FULL_CONTROL" }, { "Grantee": { "ID": "${res.alt.canonicalId}", "Type": "CanonicalUser" }, "Permission": "FULL_CONTROL" } ], "Owner": { "ID": "${cap.ownerId}" } } } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar" }, "identity": "alt" } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar" }, "identity": "alt" } } ] }, { "id": "copy-0011", "group": "copy", "kind": "api", "title": "Copy with REPLACE directive overwrites metadata and content type (3-byte object)", "tags": [ "tier-1", "copy", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5700", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": { "$base64": "AAAA" }, "contentType": "audio/ogg", "metadata": { "key1": "value1", "key2": "value2" } } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar", "Metadata": { "key3": "value3", "key2": "value2" }, "MetadataDirective": "REPLACE", "ContentType": "audio/mpeg" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo" }, "expect": { "response": { "ContentType": "audio/mpeg", "Metadata": { "key3": "value3", "key2": "value2", "key1": { "$absent": true } }, "ContentLength": 3 } } } } ] }, { "id": "copy-0012", "group": "copy", "kind": "api", "title": "Copy retains metadata and content type (3-byte object)", "tags": [ "tier-1", "copy", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5680", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": { "$base64": "AAAA" }, "contentType": "audio/ogg", "metadata": { "key1": "value1", "key2": "value2" } } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo" }, "expect": { "response": { "ContentType": "audio/ogg", "Metadata": { "key1": "value1", "key2": "value2" }, "ContentLength": 3 } } } } ] }, { "id": "copy-0013", "group": "copy", "kind": "api", "title": "Copy an object onto itself without changes returns InvalidRequest", "tags": [ "tier-1", "copy", "errors", "source:ceph-s3-tests", "source:msst-s3" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5576", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": "foo" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar", "CopySource": "${res.b1.name}/foo123bar" }, "expect": { "status": 400, "error": "InvalidRequest" } } } ] }, { "id": "copy-0014", "group": "copy", "kind": "api", "title": "Copy an object onto itself with the REPLACE metadata directive", "tags": [ "tier-1", "copy", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5590", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": "foo" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar", "CopySource": "${res.b1.name}/foo123bar", "Metadata": { "foo": "bar" }, "MetadataDirective": "REPLACE" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar" }, "expect": { "response": { "Metadata": { "foo": "bar" } } } } } ] }, { "id": "copy-0015", "group": "copy", "kind": "api", "title": "Copy preserves the source object's Content-Type", "tags": [ "tier-1", "copy", "source:ceph-s3-tests", "source:msst-s3" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5558", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": "foo", "contentType": "text/bla" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo" }, "expect": { "body": "foo", "response": { "ContentType": "text/bla" } } } } ] }, { "id": "copy-0016", "group": "copy", "kind": "api", "title": "Copy specific versions across versioned and non-versioned buckets", "tags": [ "tier-1", "copy", "versioning", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5742", "prerequisites": [ { "$bucket": { "handle": "b1", "versioning": "Enabled" } }, { "$bucket": { "handle": "b2", "versioning": "Enabled" } }, { "$bucket": { "handle": "b3" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": { "$base64": "AAAAAAA=" } } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar?versionId=${res.o1.versionId}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo" }, "capture": { "vid2": "VersionId" }, "expect": { "body": { "$base64": "AAAAAAA=" }, "response": { "ContentLength": 5 } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo2", "CopySource": "${res.b1.name}/bar321foo?versionId=${cap.vid2}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo2" }, "expect": { "body": { "$base64": "AAAAAAA=" }, "response": { "ContentLength": 5 } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b2.name}", "Key": "bar321foo3", "CopySource": "${res.b1.name}/foo123bar?versionId=${res.o1.versionId}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b2.name}", "Key": "bar321foo3" }, "expect": { "body": { "$base64": "AAAAAAA=" }, "response": { "ContentLength": 5 } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b3.name}", "Key": "bar321foo4", "CopySource": "${res.b1.name}/foo123bar?versionId=${res.o1.versionId}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b3.name}", "Key": "bar321foo4" }, "expect": { "body": { "$base64": "AAAAAAA=" }, "response": { "ContentLength": 5 } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar2", "CopySource": "${res.b3.name}/bar321foo4" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar2" }, "expect": { "body": { "$base64": "AAAAAAA=" }, "response": { "ContentLength": 5 } } } } ] }, { "id": "copy-0017", "group": "copy", "kind": "api", "title": "Copy a specific version of an object whose key needs URL encoding", "tags": [ "tier-1", "copy", "versioning", "encoding", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5807", "prerequisites": [ { "$bucket": { "handle": "b1", "versioning": "Enabled" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo?bar", "body": "" } } ], "steps": [ { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo?bar" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar&foo", "CopySource": "${res.b1.name}/foo?bar?versionId=${res.o1.versionId}" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar&foo" } } } ] }, { "id": "copy-0018", "group": "copy", "kind": "api", "title": "Copy versions of a multipart object across versioned and non-versioned buckets, retaining body, metadata and content type", "tags": [ "tier-1", "copy", "versioning", "multipart", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5912", "prerequisites": [ { "$bucket": { "handle": "b1", "versioning": "Enabled" } }, { "$bucket": { "handle": "b2", "versioning": "Enabled" } }, { "$bucket": { "handle": "b3" } } ], "data": { "src": { "$prng": { "seed": "copy-0018/src", "size": 31457280 } }, "part1": { "$slice": { "of": "src", "offset": 0, "length": 5242880 } }, "part2": { "$slice": { "of": "src", "offset": 5242880, "length": 5242880 } }, "part3": { "$slice": { "of": "src", "offset": 10485760, "length": 5242880 } }, "part4": { "$slice": { "of": "src", "offset": 15728640, "length": 5242880 } }, "part5": { "$slice": { "of": "src", "offset": 20971520, "length": 5242880 } }, "part6": { "$slice": { "of": "src", "offset": 26214400, "length": 5242880 } } }, "steps": [ { "$operation": { "name": "CreateMultipartUpload", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart", "Metadata": { "foo": "bar" }, "ContentType": "text/bla" }, "capture": { "uploadId": "UploadId" } } }, { "$operation": { "name": "UploadPart", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart", "UploadId": "${cap.uploadId}", "PartNumber": 1, "Body": { "$data": "part1" } }, "capture": { "etag1": "ETag" } } }, { "$operation": { "name": "UploadPart", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart", "UploadId": "${cap.uploadId}", "PartNumber": 2, "Body": { "$data": "part2" } }, "capture": { "etag2": "ETag" } } }, { "$operation": { "name": "UploadPart", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart", "UploadId": "${cap.uploadId}", "PartNumber": 3, "Body": { "$data": "part3" } }, "capture": { "etag3": "ETag" } } }, { "$operation": { "name": "UploadPart", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart", "UploadId": "${cap.uploadId}", "PartNumber": 4, "Body": { "$data": "part4" } }, "capture": { "etag4": "ETag" } } }, { "$operation": { "name": "UploadPart", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart", "UploadId": "${cap.uploadId}", "PartNumber": 5, "Body": { "$data": "part5" } }, "capture": { "etag5": "ETag" } } }, { "$operation": { "name": "UploadPart", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart", "UploadId": "${cap.uploadId}", "PartNumber": 6, "Body": { "$data": "part6" } }, "capture": { "etag6": "ETag" } } }, { "$operation": { "name": "CompleteMultipartUpload", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart", "UploadId": "${cap.uploadId}", "MultipartUpload": { "Parts": [ { "PartNumber": 1, "ETag": "${cap.etag1}" }, { "PartNumber": 2, "ETag": "${cap.etag2}" }, { "PartNumber": 3, "ETag": "${cap.etag3}" }, { "PartNumber": 4, "ETag": "${cap.etag4}" }, { "PartNumber": 5, "ETag": "${cap.etag5}" }, { "PartNumber": 6, "ETag": "${cap.etag6}" } ] } } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "srcmultipart" }, "capture": { "vid1": "VersionId" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dstmultipart", "CopySource": "${res.b1.name}/srcmultipart?versionId=${cap.vid1}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "dstmultipart" }, "capture": { "vid2": "VersionId" }, "expect": { "body": { "$size": 31457280, "$md5": "${data.src.md5}" }, "response": { "ContentLength": 31457280, "Metadata": { "foo": "bar" }, "ContentType": "text/bla" } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dstmultipart2", "CopySource": "${res.b1.name}/dstmultipart?versionId=${cap.vid2}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "dstmultipart2" }, "expect": { "body": { "$size": 31457280, "$md5": "${data.src.md5}" }, "response": { "ContentLength": 31457280, "Metadata": { "foo": "bar" }, "ContentType": "text/bla" } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b2.name}", "Key": "dstmultipart3", "CopySource": "${res.b1.name}/srcmultipart?versionId=${cap.vid1}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b2.name}", "Key": "dstmultipart3" }, "expect": { "body": { "$size": 31457280, "$md5": "${data.src.md5}" }, "response": { "ContentLength": 31457280, "Metadata": { "foo": "bar" }, "ContentType": "text/bla" } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b3.name}", "Key": "dstmultipart4", "CopySource": "${res.b1.name}/srcmultipart?versionId=${cap.vid1}" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b3.name}", "Key": "dstmultipart4" }, "expect": { "body": { "$size": 31457280, "$md5": "${data.src.md5}" }, "response": { "ContentLength": 31457280, "Metadata": { "foo": "bar" }, "ContentType": "text/bla" } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b3.name}", "Key": "dstmultipart5", "CopySource": "${res.b3.name}/dstmultipart4" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b3.name}", "Key": "dstmultipart5" }, "expect": { "body": { "$size": 31457280, "$md5": "${data.src.md5}" }, "response": { "ContentLength": 31457280, "Metadata": { "foo": "bar" }, "ContentType": "text/bla" } } } } ] }, { "id": "copy-0019", "group": "copy", "kind": "api", "title": "Copy a zero-length object", "tags": [ "tier-1", "copy", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L5514", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "foo123bar", "body": "foo123bar" } } ], "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "foo123bar", "Body": "" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo", "CopySource": "${res.b1.name}/foo123bar" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "bar321foo" }, "expect": { "response": { "ContentLength": 0 } } } } ] }, { "id": "copy-0020", "group": "copy", "kind": "api", "title": "Checksums are preserved across overwrite and server-side copy", "description": "Reduced to the firm assertions of the source test: STANDARD upload ETag equals MD5, overwrite keeps content identical, and a server-side copy has identical content. Vendor-tolerant storage-class transition loops are omitted.", "tags": [ "tier-1", "copy", "object-crud", "checksums", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/basic/8.py#L15", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "data": { "med": { "$pattern": { "pattern": "x", "size": 1048576 } } }, "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "tier-test-medium.bin", "Body": { "$data": "med" }, "StorageClass": "STANDARD", "Metadata": { "original-md5": "${data.med.md5}", "original-sha256": "${data.med.sha256}", "size-category": "medium" } }, "expect": { "response": { "ETag": "${data.med.etag}" } } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "tier-test-medium.bin" }, "expect": { "body": { "$md5": "${data.med.md5}", "$sha256": "${data.med.sha256}" } } } }, { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "tier-test-medium.bin", "Body": { "$data": "med" }, "Metadata": { "version": "2", "original-md5": "${data.med.md5}" } } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "tier-test-medium.bin" }, "expect": { "body": { "$md5": "${data.med.md5}" } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "tier-test-medium.bin-copy", "CopySource": "${res.b1.name}/tier-test-medium.bin" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "tier-test-medium.bin-copy" }, "expect": { "body": { "$md5": "${data.med.md5}", "$sha256": "${data.med.sha256}" } } } } ] }, { "id": "copy-0021", "group": "copy", "kind": "api", "title": "CopyObject to a new key within the same bucket succeeds", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/basic/59.py#L14", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "content-test.txt", "body": "Original content" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "content-test.txt.copy", "CopySource": "${res.b1.name}/content-test.txt" } } } ] }, { "id": "copy-0022", "group": "copy", "kind": "api", "title": "CopySource with a leading slash is accepted", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L100", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$bucket": { "handle": "b2" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "src-obj", "body": { "$data": "d" } } } ], "data": { "d": { "$pattern": { "pattern": "x", "size": 1234567 } } }, "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b2.name}", "Key": "src-obj", "CopySource": "/${res.b1.name}/src-obj" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b2.name}", "Key": "src-obj" }, "expect": { "response": { "ContentLength": 1234567 }, "body": { "$size": 1234567, "$sha256": "${data.d.sha256}" } } } } ] }, { "id": "copy-0023", "group": "copy", "kind": "api", "title": "CopyObject onto itself with an invalid MetadataDirective is rejected", "description": "Original test accepts InvalidArgument or InvalidRequest; both are HTTP 400, so only the status is asserted.", "tags": [ "tier-1", "copy", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L30", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "my-obj", "body": "test data" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "my-obj", "CopySource": "${res.b1.name}/my-obj", "MetadataDirective": "invalid" }, "expect": { "status": 400 } } } ] }, { "id": "copy-0024", "group": "copy", "kind": "api", "title": "CopySource without a bucket/key slash separator is rejected", "description": "Original test accepts InvalidArgument, InvalidRequest, NoSuchKey or NoSuchBucket; AWS returns 400 InvalidArgument for a copy source lacking a slash, which is asserted here.", "tags": [ "tier-1", "copy", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L138", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "src-obj", "body": "test data" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}src-obj" }, "expect": { "status": 400, "error": "InvalidArgument" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}" }, "expect": { "status": 400, "error": "InvalidArgument" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "src-obj" }, "expect": { "status": 400, "error": "InvalidArgument" } } } ] }, { "id": "copy-0025", "group": "copy", "kind": "api", "title": "CopyObject with an invalid TaggingDirective is rejected", "description": "Original test accepts InvalidArgument or InvalidRequest; both are HTTP 400, so only the status is asserted.", "tags": [ "tier-1", "copy", "tagging", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L65", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "src-obj", "body": "test data" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}/src-obj", "TaggingDirective": "invalid" }, "expect": { "status": 400 } } } ] }, { "id": "copy-0026", "group": "copy", "kind": "api", "title": "CopyObject with MetadataDirective=COPY preserves metadata and Content-Type", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L209", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "src-obj", "body": "test data", "contentType": "text/plain", "metadata": { "key1": "value1", "key2": "value2" } } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}/src-obj", "MetadataDirective": "COPY" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj" }, "expect": { "response": { "Metadata": { "key1": "value1", "key2": "value2" }, "ContentType": "text/plain" } } } } ] }, { "id": "copy-0027", "group": "copy", "kind": "api", "title": "CopyObject with MetadataDirective=REPLACE applies new metadata and Content-Type", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L250", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "src-obj", "body": "test data", "contentType": "text/plain", "metadata": { "old": "metadata" } } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}/src-obj", "MetadataDirective": "REPLACE", "Metadata": { "new": "metadata", "another": "value" }, "ContentType": "application/json" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj" }, "expect": { "response": { "Metadata": { "new": "metadata", "another": "value", "old": { "$absent": true } }, "ContentType": "application/json" } } } } ] }, { "id": "copy-0028", "group": "copy", "kind": "api", "title": "CopyObject of a non-existent directory-style key returns NoSuchKey", "tags": [ "tier-1", "copy", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L182", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}/non-existing-dir/" }, "expect": { "status": 404, "error": "NoSuchKey" } } } ] }, { "id": "copy-0029", "group": "copy", "kind": "api", "title": "CopyObject with MetadataDirective=REPLACE updates content headers", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L376", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "src-obj", "Body": "test data", "ContentType": "text/plain", "ContentEncoding": "gzip", "ContentLanguage": "en", "CacheControl": "no-cache" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}/src-obj", "MetadataDirective": "REPLACE", "ContentType": "application/json", "ContentEncoding": "identity", "ContentLanguage": "fr", "CacheControl": "max-age=3600" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj" }, "expect": { "response": { "ContentType": "application/json", "ContentEncoding": "identity", "ContentLanguage": "fr", "CacheControl": "max-age=3600" } } } } ] }, { "id": "copy-0030", "group": "copy", "kind": "api", "title": "CopyObject with spaces in the source key", "tags": [ "tier-1", "copy", "encoding", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L424", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "my obj with spaces", "body": "test data" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}/my obj with spaces" } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj" }, "expect": { "body": "test data" } } } ] }, { "id": "copy-0031", "group": "copy", "kind": "api", "title": "CopyObject with TaggingDirective=COPY preserves source tags", "tags": [ "tier-3", "copy", "tagging", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L293", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "src-obj", "Body": "test data", "Tagging": "tag1=value1&tag2=value2" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}/src-obj", "TaggingDirective": "COPY" } } }, { "$operation": { "name": "GetObjectTagging", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj" }, "expect": { "response": { "TagSet": { "$length": 2, "$contains": { "Key": "tag1", "Value": "value1" } } } } } }, { "$operation": { "name": "GetObjectTagging", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj" }, "expect": { "response": { "TagSet": { "$contains": { "Key": "tag2", "Value": "value2" } } } } } } ] }, { "id": "copy-0032", "group": "copy", "kind": "api", "title": "CopyObject with TaggingDirective=REPLACE applies new tags", "tags": [ "tier-3", "copy", "tagging", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_directives.py#L334", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "src-obj", "Body": "test data", "Tagging": "old=tag" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj", "CopySource": "${res.b1.name}/src-obj", "TaggingDirective": "REPLACE", "Tagging": "new=tag&another=tag" } } }, { "$operation": { "name": "GetObjectTagging", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj" }, "expect": { "response": { "TagSet": { "$length": 2, "$contains": { "Key": "new", "Value": "tag" } } } } } }, { "$operation": { "name": "GetObjectTagging", "params": { "Bucket": "${res.b1.name}", "Key": "dest-obj" }, "expect": { "response": { "TagSet": { "$contains": { "Key": "another", "Value": "tag" } } } } } } ] }, { "id": "copy-0033", "group": "copy", "kind": "api", "title": "CopyObject with a malformed x-amz-copy-source (no bucket/key separator) is rejected", "description": "The original test accepted InvalidArgument or InvalidRequest; AWS returns InvalidArgument for a copy source without a bucket/key separator. Expressed as a raw-HTTP step so the malformed header bypasses SDK client-side validation.", "tags": [ "tier-1", "copy", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_edge_cases.py#L172", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$http": { "method": "PUT", "path": "/${res.b1.name}/dest-object", "headers": { "x-amz-copy-source": "invalid-format" }, "expect": { "status": 400, "error": "InvalidArgument" } } } ] }, { "id": "copy-0034", "group": "copy", "kind": "api", "title": "CopyObject to a non-existing destination bucket returns NoSuchBucket", "tags": [ "tier-1", "copy", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_edge_cases.py#L94", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "source-object", "body": { "$data": "src" } } } ], "data": { "src": { "$prng": { "seed": "copy-0034/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "non-existing-bucket-12345", "Key": "dest-object", "CopySource": "${res.b1.name}/source-object" }, "expect": { "status": 404, "error": "NoSuchBucket" } } } ] }, { "id": "copy-0035", "group": "copy", "kind": "api", "title": "CopyObject with a non-existing source key returns NoSuchKey", "tags": [ "tier-1", "copy", "errors", "source:msst-s3", "source:ceph-s3-tests" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_edge_cases.py#L65", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-object", "CopySource": "${res.b1.name}/non-existing-source" }, "expect": { "status": 404, "error": "NoSuchKey" } } } ] }, { "id": "copy-0036", "group": "copy", "kind": "api", "title": "CopyObject preserves the source ContentType by default", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_edge_cases.py#L305", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "source-typed", "body": { "$data": "src" }, "contentType": "application/json" } } ], "data": { "src": { "$prng": { "seed": "copy-0036/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-typed", "CopySource": "${res.b1.name}/source-typed" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-typed" }, "expect": { "response": { "ContentType": "application/json" } } } } ] }, { "id": "copy-0037", "group": "copy", "kind": "api", "title": "CopyObject response includes a CopyObjectResult and the copy has an ETag", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_edge_cases.py#L383", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "source-etag", "body": { "$data": "src" } } } ], "data": { "src": { "$prng": { "seed": "copy-0037/src", "size": 128 } } }, "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-etag", "CopySource": "${res.b1.name}/source-etag" }, "expect": { "response": { "CopyObjectResult": { "$exists": true } } } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-etag" }, "expect": { "response": { "ETag": { "$exists": true } } } } } ] }, { "id": "copy-0038", "group": "copy", "kind": "api", "title": "CopyObject with default tagging directive copies the source tags", "tags": [ "tier-3", "copy", "tagging", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_edge_cases.py#L200", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "data": { "src": { "$prng": { "seed": "copy-0038/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "source-tagged", "Body": { "$data": "src" }, "Tagging": "source=true&env=test" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-tagged", "CopySource": "${res.b1.name}/source-tagged" } } }, { "$operation": { "name": "GetObjectTagging", "params": { "Bucket": "${res.b1.name}", "Key": "dest-tagged" }, "expect": { "response": { "TagSet": { "$contains": { "Key": "source", "Value": "true" } } } } } } ] }, { "id": "copy-0039", "group": "copy", "kind": "api", "title": "CopyObject with TaggingDirective REPLACE replaces the source tags", "tags": [ "tier-3", "copy", "tagging", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_edge_cases.py#L251", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "data": { "src": { "$prng": { "seed": "copy-0039/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "source-tagged", "Body": { "$data": "src" }, "Tagging": "source=true" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-tagged", "CopySource": "${res.b1.name}/source-tagged", "TaggingDirective": "REPLACE", "Tagging": "copied=true&version=2" } } }, { "$operation": { "name": "GetObjectTagging", "params": { "Bucket": "${res.b1.name}", "Key": "dest-tagged" }, "expect": { "response": { "TagSet": { "$length": 2, "$contains": { "Key": "copied", "Value": "true" } } } } } } ] }, { "id": "copy-0040", "group": "copy", "kind": "api", "title": "CopyObject between buckets preserves ContentType and custom metadata", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_metadata.py#L402", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$bucket": { "handle": "b2" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "test-object", "body": { "$data": "src" }, "contentType": "text/plain", "metadata": { "origin": "source-bucket" } } } ], "data": { "src": { "$prng": { "seed": "copy-0040/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b2.name}", "Key": "test-object", "CopySource": "${res.b1.name}/test-object" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b2.name}", "Key": "test-object" }, "expect": { "response": { "ContentType": "text/plain", "Metadata": { "origin": "source-bucket" } } } } } ] }, { "id": "copy-0041", "group": "copy", "kind": "api", "title": "CopyObject preserves all content headers and custom metadata by default", "description": "The original test set Expires to a dynamic now+10h timestamp; a fixed future HTTP-date is used instead (Expires is not asserted here).", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_metadata.py#L32", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "data": { "src": { "$prng": { "seed": "copy-0041/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "source-object", "Body": { "$data": "src" }, "ContentType": "application/json", "ContentEncoding": "base64", "ContentDisposition": "attachment; filename=\"test.json\"", "ContentLanguage": "en-US", "CacheControl": "no-cache, no-store", "Expires": "Sun, 01 Jan 2034 00:00:00 GMT", "Metadata": { "foo": "bar", "baz": "quxx", "test-key": "test-value" } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-object", "CopySource": "${res.b1.name}/source-object" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-object" }, "expect": { "response": { "ContentLength": 100, "ContentType": "application/json", "ContentEncoding": "base64", "ContentDisposition": "attachment; filename=\"test.json\"", "ContentLanguage": "en-US", "CacheControl": "no-cache, no-store", "Metadata": { "foo": "bar", "baz": "quxx", "test-key": "test-value" } } } } } ] }, { "id": "copy-0042", "group": "copy", "kind": "api", "title": "CopyObject onto itself with REPLACE sets the new metadata map", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_metadata.py#L169", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "test-object", "body": { "$data": "src" }, "metadata": { "version": "1" } } } ], "data": { "src": { "$prng": { "seed": "copy-0042/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "test-object", "CopySource": "${res.b1.name}/test-object", "MetadataDirective": "REPLACE", "Metadata": { "version": "2", "updated": "true" } } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "test-object" }, "expect": { "response": { "Metadata": { "version": "2", "updated": "true" } } } } } ] }, { "id": "copy-0043", "group": "copy", "kind": "api", "title": "CopyObject preserves CacheControl and Expires headers", "description": "The original test set Expires to a dynamic now+24h timestamp; a fixed future HTTP-date is used instead, and only the presence of Expires is asserted (as in the original).", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_metadata.py#L450", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "data": { "src": { "$prng": { "seed": "copy-0043/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "source-cached", "Body": { "$data": "src" }, "CacheControl": "max-age=3600, public", "Expires": "Sun, 01 Jan 2034 00:00:00 GMT" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-cached", "CopySource": "${res.b1.name}/source-cached" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-cached" }, "expect": { "response": { "CacheControl": "max-age=3600, public", "Expires": { "$exists": true } } } } } ] }, { "id": "copy-0044", "group": "copy", "kind": "api", "title": "CopyObject preserves the CRC32 checksum of the source object", "tags": [ "tier-3", "copy", "checksums", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_metadata.py#L339", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "data": { "src": { "$prng": { "seed": "copy-0044/src", "size": 512 } } }, "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "source-checksummed", "Body": { "$data": "src" }, "ChecksumAlgorithm": "CRC32" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-checksummed", "CopySource": "${res.b1.name}/source-checksummed" } } }, { "$operation": { "name": "GetObjectAttributes", "params": { "Bucket": "${res.b1.name}", "Key": "dest-checksummed", "ObjectAttributes": [ "Checksum" ] }, "expect": { "response": { "Checksum": { "ChecksumCRC32": "${data.src.crc32B64}" } } } } } ] }, { "id": "copy-0045", "group": "copy", "kind": "api", "title": "CopyObject tagging directives: default copies tags, REPLACE substitutes them", "tags": [ "tier-3", "copy", "tagging", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_object_metadata.py#L265", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "data": { "src": { "$prng": { "seed": "copy-0045/src", "size": 100 } } }, "steps": [ { "$operation": { "name": "PutObject", "params": { "Bucket": "${res.b1.name}", "Key": "source-tagged", "Body": { "$data": "src" }, "Tagging": "source=true&version=1" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-copy-tags", "CopySource": "${res.b1.name}/source-tagged" } } }, { "$operation": { "name": "GetObjectTagging", "params": { "Bucket": "${res.b1.name}", "Key": "dest-copy-tags" }, "expect": { "response": { "TagSet": { "$contains": { "Key": "source", "Value": "true" } } } } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "dest-replace-tags", "CopySource": "${res.b1.name}/source-tagged", "TaggingDirective": "REPLACE", "Tagging": "copied=true&version=2" } } }, { "$operation": { "name": "GetObjectTagging", "params": { "Bucket": "${res.b1.name}", "Key": "dest-replace-tags" }, "expect": { "response": { "TagSet": { "$length": 2, "$contains": { "Key": "copied", "Value": "true" } } } } } } ] }, { "id": "copy-0046", "group": "copy", "kind": "api", "title": "CopyObject with CopySourceIfMatch: matching ETag succeeds, wrong ETag fails", "description": "Original test accepted any error for the wrong-ETag copy (bare except); the canonical S3 behavior of 412 PreconditionFailed is asserted here.", "tags": [ "tier-1", "copy", "conditional", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_operations.py#L161", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "source-object", "body": "original data", "metadata": { "original": "metadata" } } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "conditional-copy-match", "CopySource": "${res.b1.name}/source-object", "CopySourceIfMatch": "${res.o1.etag}" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "conditional-copy-no-match", "CopySource": "${res.b1.name}/source-object", "CopySourceIfMatch": "\"wrong-etag\"" }, "expect": { "status": 412, "error": "PreconditionFailed" } } } ] }, { "id": "copy-0047", "group": "copy", "kind": "api", "title": "CopyObject of a 6 MiB object preserves its size", "tags": [ "tier-1", "copy", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_copy_operations.py#L193", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$bucket": { "handle": "b2" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "large-object", "body": { "$data": "big" } } } ], "data": { "big": { "$pattern": { "pattern": "X", "size": 6291456 } } }, "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b2.name}", "Key": "large-copy", "CopySource": "${res.b1.name}/large-object" } } }, { "$operation": { "name": "HeadObject", "params": { "Bucket": "${res.b2.name}", "Key": "large-copy" }, "expect": { "response": { "ContentLength": 6291456 } } } } ] }, { "id": "copy-0048", "group": "copy", "kind": "api", "title": "Prefix rename via CopyObject + DeleteObject leaves old prefix empty and content intact", "description": "Directory rename emulated as copy-to-new-prefix then delete-from-old. Object count reduced from the source's 1000 to a representative sample.", "tags": [ "tier-1", "copy", "listing", "object-crud", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/production/3017.py#L32", "prerequisites": [ { "$bucket": { "handle": "b1" } }, { "$object": { "handle": "o1", "bucket": "b1", "key": "old-dir/file-0000.txt", "body": "content-0" } }, { "$object": { "handle": "o2", "bucket": "b1", "key": "old-dir/file-0001.txt", "body": "content-1" } }, { "$object": { "handle": "o3", "bucket": "b1", "key": "old-dir/file-0002.txt", "body": "content-2" } }, { "$object": { "handle": "o4", "bucket": "b1", "key": "old-dir/file-0003.txt", "body": "content-3" } } ], "steps": [ { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "new-dir/file-0000.txt", "CopySource": "${res.b1.name}/old-dir/file-0000.txt" } } }, { "$operation": { "name": "DeleteObject", "params": { "Bucket": "${res.b1.name}", "Key": "old-dir/file-0000.txt" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "new-dir/file-0001.txt", "CopySource": "${res.b1.name}/old-dir/file-0001.txt" } } }, { "$operation": { "name": "DeleteObject", "params": { "Bucket": "${res.b1.name}", "Key": "old-dir/file-0001.txt" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "new-dir/file-0002.txt", "CopySource": "${res.b1.name}/old-dir/file-0002.txt" } } }, { "$operation": { "name": "DeleteObject", "params": { "Bucket": "${res.b1.name}", "Key": "old-dir/file-0002.txt" } } }, { "$operation": { "name": "CopyObject", "params": { "Bucket": "${res.b1.name}", "Key": "new-dir/file-0003.txt", "CopySource": "${res.b1.name}/old-dir/file-0003.txt" } } }, { "$operation": { "name": "DeleteObject", "params": { "Bucket": "${res.b1.name}", "Key": "old-dir/file-0003.txt" } } }, { "$operation": { "name": "ListObjectsV2", "params": { "Bucket": "${res.b1.name}", "Prefix": "old-dir/" }, "expect": { "status": 200, "response": { "KeyCount": 0 } } } }, { "$operation": { "name": "ListObjectsV2", "params": { "Bucket": "${res.b1.name}", "Prefix": "new-dir/" }, "expect": { "status": 200, "response": { "KeyCount": 4, "Contents": [ { "Key": "new-dir/file-0000.txt" }, { "Key": "new-dir/file-0001.txt" }, { "Key": "new-dir/file-0002.txt" }, { "Key": "new-dir/file-0003.txt" } ] } } } }, { "$operation": { "name": "GetObject", "params": { "Bucket": "${res.b1.name}", "Key": "new-dir/file-0000.txt" }, "expect": { "status": 200, "body": "content-0" } } } ] } ] }