From 3f8a16c5abb66d0cf5913fea70130c74756608c3 Mon Sep 17 00:00:00 2001 From: Tip ten Brink <75669206+tiptenbrink@users.noreply.github.com> Date: Sat, 3 Oct 2026 09:29:11 +0200 Subject: [PATCH] Move bucket and container cases to management.json. management.json holds the 22 bucket and container cases, renamed management//, and four new ones: PutBucketVersioning, GetBucketVersioning with versioning on and never turned on, and an S3 Express directory bucket's CreateBucket. All 26 were verified live. Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 3 +- cases/management.json | 2640 +++++++++++++++++++++++++++++++++++++++++ cases/operations.json | 2197 ++-------------------------------- tests/grading.rs | 7 +- 4 files changed, 2752 insertions(+), 2095 deletions(-) create mode 100644 cases/management.json diff --git a/README.md b/README.md index 428155d..d8bd6f1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ There are also a few live tests that are just to see if you can actually make a | Suite | Contents | |---|---| -| `operations.json` | Operations over recorded HTTP | +| `operations.json` | Object operations over recorded HTTP | +| `management.json` | Bucket and container operations over recorded HTTP | | `vectors.json` | Digests and signatures | | `live.json` | Probes against a live service | diff --git a/cases/management.json b/cases/management.json new file mode 100644 index 0000000..bbc3eca --- /dev/null +++ b/cases/management.json @@ -0,0 +1,2640 @@ +{ + "version": 1, + "index": { + "management/azure-hns/container-properties": "Read the properties of a container", + "management/azure-hns/container-properties-absent": "Report a missing container when reading its properties", + "management/azure-hns/create-container": "Create a container", + "management/azure-hns/create-container-exists": "Refuse to create a container that exists", + "management/azure-hns/create-container-invalid-name": "Refuse a container name with capitals and an underscore", + "management/azure-hns/delete-container": "Delete a container", + "management/azure-hns/delete-container-absent": "Report a missing container on delete", + "management/azure-hns/list-containers": "List the containers whose names start with a prefix", + "management/azure/container-properties": "Read the properties of a container", + "management/azure/container-properties-absent": "Report a missing container when reading its properties", + "management/azure/create-container": "Create a container", + "management/azure/create-container-exists": "Refuse to create a container that exists", + "management/azure/create-container-invalid-name": "Refuse a container name with capitals and an underscore", + "management/azure/delete-container": "Delete a container", + "management/azure/delete-container-absent": "Report a missing container on delete", + "management/azure/list-containers": "List the containers whose names start with a prefix", + "management/s3-express/create-bucket": "Create a directory bucket in an availability zone. The request goes to the regional control endpoint, s3express-control, by path, signed with the account credentials and no session", + "management/s3/create-bucket": "Create a bucket in the region of the endpoint", + "management/s3/create-bucket-owned": "Refuse to create a bucket that the account already owns", + "management/s3/delete-bucket": "Delete an empty bucket", + "management/s3/get-bucket-versioning": "Report a bucket's versioning status, Enabled once versioning was turned on", + "management/s3/get-bucket-versioning-never-enabled": "Report no versioning status for a bucket that never had versioning turned on. S3 answers a VersioningConfiguration without a Status", + "management/s3/head-bucket": "Confirm that a bucket exists", + "management/s3/head-bucket-missing": "Report a bucket that does not exist", + "management/s3/list-buckets": "List the buckets whose names start with a prefix", + "management/s3/put-bucket-versioning": "Turn on versioning in a bucket, with a VersioningConfiguration whose Status is Enabled. The data-plane runs keep earlier versions in such a bucket" + }, + "profiles": { + "azure": { + "provider": "azure", + "endpoint": { + "account": "fixture", + "bucket": "fixture", + "region": "us-east-1" + }, + "checks": [ + { + "at": "/headers/x-ms-date", + "optional": true, + "rule": { + "is": "fresh", + "format": "http", + "max_past_seconds": 900, + "max_future_seconds": 60 + } + }, + { + "at": "/headers/date", + "optional": true, + "rule": { + "is": "fresh", + "format": "http", + "max_past_seconds": 900, + "max_future_seconds": 60 + } + }, + { + "at": "/headers/x-ms-client-request-id", + "optional": true, + "rule": { + "is": "matches", + "pattern": ".{0,1024}" + } + }, + { + "at": "/headers/x-ms-version", + "optional": false, + "rule": { + "is": "one_of", + "values": [ + "2018-11-09", + "2019-12-12", + "2020-10-02", + "2021-12-02", + "2023-11-03", + "2024-11-04", + "2025-01-05", + "2025-11-05", + "2026-02-06", + "2026-04-06" + ] + } + } + ], + "allow_headers": [ + "host", + "content-length", + "transfer-encoding", + "connection", + "expect", + "user-agent", + "accept", + "accept-encoding", + "authorization" + ], + "allow_query": [] + }, + "azure-hns": { + "provider": "azure", + "endpoint": { + "account": "fixture", + "bucket": "fixture", + "hierarchical_namespace": true, + "region": "us-east-1" + }, + "checks": [ + { + "at": "/headers/x-ms-date", + "optional": true, + "rule": { + "is": "fresh", + "format": "http", + "max_past_seconds": 900, + "max_future_seconds": 60 + } + }, + { + "at": "/headers/date", + "optional": true, + "rule": { + "is": "fresh", + "format": "http", + "max_past_seconds": 900, + "max_future_seconds": 60 + } + }, + { + "at": "/headers/x-ms-client-request-id", + "optional": true, + "rule": { + "is": "matches", + "pattern": ".{0,1024}" + } + }, + { + "at": "/headers/x-ms-version", + "optional": false, + "rule": { + "is": "one_of", + "values": [ + "2018-11-09", + "2019-12-12", + "2020-10-02", + "2021-12-02", + "2023-11-03", + "2024-11-04", + "2025-01-05", + "2025-11-05", + "2026-02-06", + "2026-04-06" + ] + } + } + ], + "allow_headers": [ + "host", + "content-length", + "transfer-encoding", + "connection", + "expect", + "user-agent", + "accept", + "accept-encoding", + "authorization" + ], + "allow_query": [] + }, + "s3": { + "provider": "s3", + "endpoint": { + "account": "fixture", + "bucket": "fixture", + "region": "us-east-1" + }, + "checks": [ + { + "at": "/headers/x-amz-date", + "optional": true, + "rule": { + "is": "fresh", + "format": "amz", + "max_past_seconds": 900, + "max_future_seconds": 60 + } + }, + { + "at": "/headers/x-amz-content-sha256", + "optional": true, + "rule": { + "is": "matches", + "pattern": "[0-9a-f]{64}|UNSIGNED-PAYLOAD" + } + }, + { + "at": "/headers/x-amz-api-version", + "optional": true, + "rule": { + "is": "equal", + "value": "2006-03-01" + } + }, + { + "at": "/raw_query", + "optional": false, + "rule": { + "is": "matches", + "pattern": "[^+]*" + }, + "because": "S3 reads a + in a query as a space, so a plus in a prefix, token or upload ID must go as %2B and a space as %20" + } + ], + "allow_headers": [ + "host", + "content-length", + "transfer-encoding", + "connection", + "expect", + "user-agent", + "accept", + "accept-encoding", + "authorization", + "amz-sdk-invocation-id", + "amz-sdk-request", + "x-amz-user-agent" + ], + "allow_query": [] + }, + "s3-express": { + "provider": "s3", + "endpoint": { + "bucket": "fixture--euc1-az1--x-s3", + "control_url": "http://s3express-control.eu-central-1.fixture.invalid", + "directory_bucket": true, + "region": "eu-central-1", + "url": "http://s3express-euc1-az1.fixture.invalid" + }, + "checks": [ + { + "at": "/headers/x-amz-date", + "optional": true, + "rule": { + "is": "fresh", + "format": "amz", + "max_past_seconds": 900, + "max_future_seconds": 60 + } + }, + { + "at": "/headers/x-amz-content-sha256", + "optional": true, + "rule": { + "is": "matches", + "pattern": "[0-9a-f]{64}|UNSIGNED-PAYLOAD" + } + }, + { + "at": "/headers/x-amz-api-version", + "optional": true, + "rule": { + "is": "equal", + "value": "2006-03-01" + } + }, + { + "at": "/raw_query", + "optional": false, + "rule": { + "is": "matches", + "pattern": "[^+]*" + }, + "because": "S3 reads a + in a query as a space, so a plus in a prefix, token or upload ID must go as %2B and a space as %20" + } + ], + "allow_headers": [ + "host", + "content-length", + "transfer-encoding", + "connection", + "expect", + "user-agent", + "accept", + "accept-encoding", + "authorization", + "amz-sdk-invocation-id", + "amz-sdk-request", + "x-amz-user-agent", + "proxy-connection" + ], + "allow_query": [] + } + }, + "cases": [ + { + "id": "management/azure/list-containers", + "profile": "azure", + "lane": "core", + "purpose": "List the containers whose names start with a prefix", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2" + ], + "call": { + "op": "azure.list_containers", + "prefix": "otc-listed-" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/comp", + "optional": false, + "rule": { + "is": "equal", + "value": "list" + } + }, + { + "at": "/query/prefix", + "optional": false, + "rule": { + "is": "equal", + "value": "otc-listed-" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + } + }, + "body": { + "encoding": "utf8", + "data": "otc-listed-otc-listed-aMon, 01 Jan 2024 00:00:00 GMT\"fixture-etag\"unlockedavailablefalsefalseotc-listed-bMon, 01 Jan 2024 00:00:00 GMT\"fixture-etag\"unlockedavailablefalsefalse" + }, + "framing": "chunked" + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + }, + { + "at": "/value/containers", + "optional": false, + "rule": { + "is": "equal", + "value": [ + "otc-listed-a", + "otc-listed-b" + ] + } + } + ], + "refusal": null + }, + { + "id": "management/azure/container-properties-absent", + "profile": "azure", + "lane": "core", + "purpose": "Report a missing container when reading its properties", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties" + ], + "call": { + "container": "otc-absent", + "op": "azure.container_properties" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-absent" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 404, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + }, + "x-ms-error-code": "ContainerNotFound" + }, + "body": { + "encoding": "utf8", + "data": "ContainerNotFoundFixture error" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 404 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "ContainerNotFound" + } + } + ], + "refusal": null + }, + { + "id": "management/azure/container-properties", + "profile": "azure", + "lane": "core", + "purpose": "Read the properties of a container", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties" + ], + "call": { + "container": "otc-read", + "op": "azure.container_properties" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-read" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "date": { + "from": "now" + }, + "etag": "\"fixture-etag\"", + "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT", + "x-ms-has-immutability-policy": "false", + "x-ms-has-legal-hold": "false", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked" + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/azure/delete-container-absent", + "profile": "azure", + "lane": "core", + "purpose": "Report a missing container on delete", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container" + ], + "call": { + "container": "otc-absent", + "op": "azure.delete_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "DELETE" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-absent" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 404, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + }, + "x-ms-error-code": "ContainerNotFound" + }, + "body": { + "encoding": "utf8", + "data": "ContainerNotFoundFixture error" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 404 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "ContainerNotFound" + } + } + ], + "refusal": null + }, + { + "id": "management/azure/delete-container", + "profile": "azure", + "lane": "core", + "purpose": "Delete a container", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container" + ], + "call": { + "container": "otc-deleted", + "op": "azure.delete_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "DELETE" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-deleted" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 202, + "headers": { + "date": { + "from": "now" + } + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/azure/create-container-invalid-name", + "profile": "azure", + "lane": "core", + "purpose": "Refuse a container name with capitals and an underscore", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata" + ], + "call": { + "container": "Otc_Invalid", + "op": "azure.create_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/Otc_Invalid" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 400, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + }, + "x-ms-error-code": "InvalidResourceName" + }, + "body": { + "encoding": "utf8", + "data": "InvalidResourceNameFixture error" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 400 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "InvalidResourceName" + } + } + ], + "refusal": null + }, + { + "id": "management/azure/create-container-exists", + "profile": "azure", + "lane": "core", + "purpose": "Refuse to create a container that exists", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/create-container" + ], + "call": { + "container": "otc-existing", + "op": "azure.create_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-existing" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 409, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + }, + "x-ms-error-code": "ContainerAlreadyExists" + }, + "body": { + "encoding": "utf8", + "data": "ContainerAlreadyExistsFixture error" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 409 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "ContainerAlreadyExists" + } + } + ], + "refusal": null + }, + { + "id": "management/azure/create-container", + "profile": "azure", + "lane": "core", + "purpose": "Create a container", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/create-container" + ], + "call": { + "container": "otc-created", + "op": "azure.create_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-created" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 201, + "headers": { + "date": { + "from": "now" + }, + "etag": "\"fixture-etag\"", + "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT" + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/azure-hns/list-containers", + "profile": "azure-hns", + "lane": "core", + "purpose": "List the containers whose names start with a prefix", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2" + ], + "call": { + "op": "azure.list_containers", + "prefix": "otc-listed-" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/comp", + "optional": false, + "rule": { + "is": "equal", + "value": "list" + } + }, + { + "at": "/query/prefix", + "optional": false, + "rule": { + "is": "equal", + "value": "otc-listed-" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + } + }, + "body": { + "encoding": "utf8", + "data": "otc-listed-otc-listed-aMon, 01 Jan 2024 00:00:00 GMT\"fixture-etag\"unlockedavailablefalsefalseotc-listed-bMon, 01 Jan 2024 00:00:00 GMT\"fixture-etag\"unlockedavailablefalsefalse" + }, + "framing": "chunked" + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + }, + { + "at": "/value/containers", + "optional": false, + "rule": { + "is": "equal", + "value": [ + "otc-listed-a", + "otc-listed-b" + ] + } + } + ], + "refusal": null + }, + { + "id": "management/azure-hns/container-properties-absent", + "profile": "azure-hns", + "lane": "core", + "purpose": "Report a missing container when reading its properties", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties" + ], + "call": { + "container": "otc-absent", + "op": "azure.container_properties" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-absent" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 404, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + }, + "x-ms-error-code": "ContainerNotFound" + }, + "body": { + "encoding": "utf8", + "data": "ContainerNotFoundFixture error" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 404 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "ContainerNotFound" + } + } + ], + "refusal": null + }, + { + "id": "management/azure-hns/container-properties", + "profile": "azure-hns", + "lane": "core", + "purpose": "Read the properties of a container", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties" + ], + "call": { + "container": "otc-read", + "op": "azure.container_properties" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-read" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "date": { + "from": "now" + }, + "etag": "\"fixture-etag\"", + "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT", + "x-ms-has-immutability-policy": "false", + "x-ms-has-legal-hold": "false", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked" + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/azure-hns/delete-container-absent", + "profile": "azure-hns", + "lane": "core", + "purpose": "Report a missing container on delete", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container" + ], + "call": { + "container": "otc-absent", + "op": "azure.delete_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "DELETE" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-absent" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 404, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + }, + "x-ms-error-code": "ContainerNotFound" + }, + "body": { + "encoding": "utf8", + "data": "ContainerNotFoundFixture error" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 404 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "ContainerNotFound" + } + } + ], + "refusal": null + }, + { + "id": "management/azure-hns/delete-container", + "profile": "azure-hns", + "lane": "core", + "purpose": "Delete a container", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container" + ], + "call": { + "container": "otc-deleted", + "op": "azure.delete_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "DELETE" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-deleted" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 202, + "headers": { + "date": { + "from": "now" + } + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/azure-hns/create-container-invalid-name", + "profile": "azure-hns", + "lane": "core", + "purpose": "Refuse a container name with capitals and an underscore", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata" + ], + "call": { + "container": "Otc_Invalid", + "op": "azure.create_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/Otc_Invalid" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 400, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + }, + "x-ms-error-code": "InvalidResourceName" + }, + "body": { + "encoding": "utf8", + "data": "InvalidResourceNameFixture error" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 400 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "InvalidResourceName" + } + } + ], + "refusal": null + }, + { + "id": "management/azure-hns/create-container-exists", + "profile": "azure-hns", + "lane": "core", + "purpose": "Refuse to create a container that exists", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/create-container" + ], + "call": { + "container": "otc-existing", + "op": "azure.create_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-existing" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 409, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + }, + "x-ms-error-code": "ContainerAlreadyExists" + }, + "body": { + "encoding": "utf8", + "data": "ContainerAlreadyExistsFixture error" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 409 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "ContainerAlreadyExists" + } + } + ], + "refusal": null + }, + { + "id": "management/azure-hns/create-container", + "profile": "azure-hns", + "lane": "core", + "purpose": "Create a container", + "sources": [ + "https://learn.microsoft.com/en-us/rest/api/storageservices/create-container" + ], + "call": { + "container": "otc-created", + "op": "azure.create_container" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/otc-created" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/restype", + "optional": false, + "rule": { + "is": "equal", + "value": "container" + } + } + ], + "allow_headers": [], + "allow_query": [], + "response": { + "status": 201, + "headers": { + "date": { + "from": "now" + }, + "etag": "\"fixture-etag\"", + "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT" + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/s3/delete-bucket", + "profile": "s3", + "lane": "core", + "purpose": "Delete an empty bucket", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html" + ], + "call": { + "bucket": "object-tests-deleted", + "op": "s3.delete_bucket" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "DELETE" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/object-tests-deleted" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + } + ], + "allow_headers": [ + "content-type" + ], + "allow_query": [], + "response": { + "status": 204, + "headers": { + "date": { + "from": "now" + } + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/s3/head-bucket", + "profile": "s3", + "lane": "core", + "purpose": "Confirm that a bucket exists", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html" + ], + "call": { + "bucket": "fixture", + "op": "s3.head_bucket" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "HEAD" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/fixture" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + } + ], + "allow_headers": [ + "content-type" + ], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "date": { + "from": "now" + }, + "x-amz-bucket-region": "eu-central-1" + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/s3/head-bucket-missing", + "profile": "s3", + "lane": "core", + "purpose": "Report a bucket that does not exist", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html" + ], + "call": { + "bucket": "object-tests-absent", + "op": "s3.head_bucket" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "HEAD" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/object-tests-absent" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + } + ], + "allow_headers": [ + "content-type" + ], + "allow_query": [], + "response": { + "status": 404, + "headers": { + "date": { + "from": "now" + } + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 404 + } + } + ], + "refusal": null + }, + { + "id": "management/s3/list-buckets", + "profile": "s3", + "lane": "core", + "purpose": "List the buckets whose names start with a prefix", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html" + ], + "call": { + "op": "s3.list_buckets", + "prefix": "object-tests-listed-" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/query/prefix", + "optional": false, + "rule": { + "is": "equal", + "value": "object-tests-listed-" + } + } + ], + "allow_headers": [ + "content-type" + ], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + } + }, + "body": { + "encoding": "utf8", + "data": "\nfixture-ownerobject-tests-listed-a2024-01-01T00:00:00.000Zeu-central-1object-tests-listed-b2024-01-01T00:00:00.000Zeu-central-1object-tests-listed-" + }, + "framing": "chunked" + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + }, + { + "at": "/value/buckets", + "optional": false, + "rule": { + "is": "equal", + "value": [ + "object-tests-listed-a", + "object-tests-listed-b" + ] + } + } + ], + "refusal": null + }, + { + "id": "management/s3/create-bucket-owned", + "profile": "s3", + "lane": "core", + "purpose": "Refuse to create a bucket that the account already owns", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html" + ], + "call": { + "bucket": "fixture", + "location": "eu-central-1", + "op": "s3.create_bucket" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/fixture" + } + }, + { + "at": "/body_text", + "optional": false, + "rule": { + "is": "xml", + "value": "eu-central-1" + } + } + ], + "allow_headers": [ + "content-type" + ], + "allow_query": [], + "response": { + "status": 409, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + } + }, + "body": { + "encoding": "utf8", + "data": "\nBucketAlreadyOwnedByYouFixture error" + }, + "framing": "chunked" + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "error" + } + }, + { + "at": "/status", + "optional": false, + "rule": { + "is": "equal", + "value": 409 + } + }, + { + "at": "/code", + "optional": false, + "rule": { + "is": "equal", + "value": "BucketAlreadyOwnedByYou" + } + } + ], + "refusal": null + }, + { + "id": "management/s3/create-bucket", + "profile": "s3", + "lane": "core", + "purpose": "Create a bucket in the region of the endpoint", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html" + ], + "call": { + "bucket": "object-tests-created", + "location": "eu-central-1", + "op": "s3.create_bucket" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/object-tests-created" + } + }, + { + "at": "/body_text", + "optional": false, + "rule": { + "is": "xml", + "value": "eu-central-1" + } + } + ], + "allow_headers": [ + "content-type" + ], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "date": { + "from": "now" + }, + "location": "/object-tests-created" + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/s3/put-bucket-versioning", + "profile": "s3", + "lane": "core", + "purpose": "Turn on versioning in a bucket, with a VersioningConfiguration whose Status is Enabled. The data-plane runs keep earlier versions in such a bucket", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html" + ], + "call": { + "bucket": "object-tests-versioned", + "op": "s3.put_bucket_versioning", + "status": "Enabled" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/object-tests-versioned" + } + }, + { + "at": "/query/versioning", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/body_text", + "optional": false, + "rule": { + "is": "xml", + "value": "Enabled" + } + }, + { + "at": "/headers/x-amz-checksum-crc64nvme", + "optional": true, + "rule": { + "is": "matches", + "pattern": "[A-Za-z0-9+/]{11}=" + } + } + ], + "allow_headers": [ + "content-type", + "x-amz-sdk-checksum-algorithm" + ], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "date": { + "from": "now" + } + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + }, + { + "id": "management/s3/get-bucket-versioning", + "profile": "s3", + "lane": "core", + "purpose": "Report a bucket's versioning status, Enabled once versioning was turned on", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html" + ], + "call": { + "bucket": "object-tests-versioned", + "op": "s3.get_bucket_versioning" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/object-tests-versioned" + } + }, + { + "at": "/query/versioning", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + } + ], + "allow_headers": [ + "content-type", + "x-amz-sdk-checksum-algorithm" + ], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + } + }, + "body": { + "encoding": "utf8", + "data": "\nEnabled" + }, + "framing": "chunked" + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + }, + { + "at": "/value/status", + "optional": false, + "rule": { + "is": "equal", + "value": "Enabled" + } + } + ], + "refusal": null + }, + { + "id": "management/s3/get-bucket-versioning-never-enabled", + "profile": "s3", + "lane": "core", + "purpose": "Report no versioning status for a bucket that never had versioning turned on. S3 answers a VersioningConfiguration without a Status", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html" + ], + "call": { + "bucket": "object-tests-versioned", + "op": "s3.get_bucket_versioning" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "GET" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/object-tests-versioned" + } + }, + { + "at": "/query/versioning", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + } + ], + "allow_headers": [ + "content-type", + "x-amz-sdk-checksum-algorithm" + ], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "content-type": "application/xml", + "date": { + "from": "now" + } + }, + "body": { + "encoding": "utf8", + "data": "\n" + }, + "framing": "chunked" + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + }, + { + "at": "/value/status", + "optional": true, + "rule": { + "is": "equal", + "value": "" + } + } + ], + "refusal": null + }, + { + "id": "management/s3-express/create-bucket", + "profile": "s3-express", + "lane": "core", + "purpose": "Create a directory bucket in an availability zone. The request goes to the regional control endpoint, s3express-control, by path, signed with the account credentials and no session", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html", + "https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html" + ], + "call": { + "availability_zone": "euc1-az1", + "bucket": "object-tests-created--euc1-az1--x-s3", + "op": "s3.create_bucket" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "PUT" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/object-tests-created--euc1-az1--x-s3" + } + }, + { + "at": "/body_text", + "optional": false, + "rule": { + "is": "xml", + "value": "euc1-az1AvailabilityZoneSingleAvailabilityZoneDirectory" + } + }, + { + "at": "/headers/host", + "optional": false, + "rule": { + "is": "equal", + "value": "s3express-control.eu-central-1.fixture.invalid" + } + }, + { + "at": "/headers/authorization", + "optional": false, + "rule": { + "is": "matches", + "pattern": "AWS4-HMAC-SHA256 Credential=offline/[0-9]{8}/eu-central-1/s3express/aws4_request, SignedHeaders=.+, Signature=[a-f0-9]{64}" + } + }, + { + "at": "/headers/x-amz-s3session-token", + "optional": false, + "rule": { + "is": "absent" + } + } + ], + "allow_headers": [ + "content-type" + ], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "date": { + "from": "now" + }, + "location": "/object-tests-created--euc1-az1--x-s3" + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + } + ], + "refusal": null + } + ] +} diff --git a/cases/operations.json b/cases/operations.json index 4315c23..9a5b45f 100644 --- a/cases/operations.json +++ b/cases/operations.json @@ -28,8 +28,6 @@ "operations/azure-hns/commit-replacement": "commit replacement", "operations/azure-hns/commit-unstaged-id": "commit unstaged id", "operations/azure-hns/commit-unstaged-id-code-in-body": "commit unstaged id, with the error code only in the XML body", - "operations/azure-hns/container-properties": "Read the properties of a container", - "operations/azure-hns/container-properties-absent": "Report a missing container when reading its properties", "operations/azure-hns/copy": "Copy an object to another key in the same container", "operations/azure-hns/copy-across-containers": "Copy a blob from another container of the same account, which x-ms-copy-source names in its URL", "operations/azure-hns/copy-if-none-match-exists": "Report a copy with If-None-Match: * onto a blob that exists as a failed condition on the destination", @@ -43,9 +41,6 @@ "operations/azure-hns/copy-sync": "Copy a blob with Copy Blob From URL, x-ms-requires-sync: true, which answers once the copy is done. The source must be readable by URL: by a SAS, or by a bearer token in x-ms-copy-source-authorization", "operations/azure-hns/copy-tier": "Copy a blob into another access tier, named in x-ms-access-tier", "operations/azure-hns/create-append": "Create an empty append blob", - "operations/azure-hns/create-container": "Create a container", - "operations/azure-hns/create-container-exists": "Refuse to create a container that exists", - "operations/azure-hns/create-container-invalid-name": "Refuse a container name with capitals and an underscore", "operations/azure-hns/create-page": "Create a page blob of 1,024 bytes, which an HNS account does not support", "operations/azure-hns/delete-accepted": "delete accepted", "operations/azure-hns/delete-accepted-key-double-slash": "delete accepted, with the key \"double//slash.txt\"", @@ -56,8 +51,6 @@ "operations/azure-hns/delete-accepted-key-question": "delete accepted, with the key \"question?mark.txt\"", "operations/azure-hns/delete-accepted-key-space": "delete accepted, with the key \"space name.txt\"", "operations/azure-hns/delete-accepted-key-trailing-slash": "delete accepted, with the key \"trailing-slash/\"", - "operations/azure-hns/delete-container": "Delete a container", - "operations/azure-hns/delete-container-absent": "Report a missing container on delete", "operations/azure-hns/delete-container-missing": "delete container missing", "operations/azure-hns/delete-current-version": "delete current version", "operations/azure-hns/delete-if-match-current": "delete if match current", @@ -166,7 +159,6 @@ "operations/azure-hns/list-bad-marker": "list bad marker", "operations/azure-hns/list-bad-marker-code-in-body": "list bad marker, with the error code only in the XML body", "operations/azure-hns/list-container-missing": "list container missing", - "operations/azure-hns/list-containers": "List the containers whose names start with a prefix", "operations/azure-hns/list-delimited": "list delimited", "operations/azure-hns/list-empty": "list empty", "operations/azure-hns/list-encoded-names": "list encoded names", @@ -304,8 +296,6 @@ "operations/azure/commit-replacement": "commit replacement", "operations/azure/commit-unstaged-id": "commit unstaged id", "operations/azure/commit-unstaged-id-code-in-body": "commit unstaged id, with the error code only in the XML body", - "operations/azure/container-properties": "Read the properties of a container", - "operations/azure/container-properties-absent": "Report a missing container when reading its properties", "operations/azure/copy": "Copy an object to another key in the same container", "operations/azure/copy-across-containers": "Copy a blob from another container of the same account, which x-ms-copy-source names in its URL", "operations/azure/copy-if-none-match-exists": "Report a copy with If-None-Match: * onto a blob that exists as a failed condition on the destination", @@ -320,9 +310,6 @@ "operations/azure/copy-sync": "Copy a blob with Copy Blob From URL, x-ms-requires-sync: true, which answers once the copy is done. The source must be readable by URL: by a SAS, or by a bearer token in x-ms-copy-source-authorization", "operations/azure/copy-tier": "Copy a blob into another access tier, named in x-ms-access-tier", "operations/azure/create-append": "Create an empty append blob", - "operations/azure/create-container": "Create a container", - "operations/azure/create-container-exists": "Refuse to create a container that exists", - "operations/azure/create-container-invalid-name": "Refuse a container name with capitals and an underscore", "operations/azure/create-page": "Create a page blob of 1,024 bytes", "operations/azure/delete-accepted": "delete accepted", "operations/azure/delete-accepted-key-double-slash": "delete accepted, with the key \"double//slash.txt\"", @@ -333,8 +320,6 @@ "operations/azure/delete-accepted-key-question": "delete accepted, with the key \"question?mark.txt\"", "operations/azure/delete-accepted-key-space": "delete accepted, with the key \"space name.txt\"", "operations/azure/delete-accepted-key-trailing-slash": "delete accepted, with the key \"trailing-slash/\"", - "operations/azure/delete-container": "Delete a container", - "operations/azure/delete-container-absent": "Report a missing container on delete", "operations/azure/delete-container-missing": "delete container missing", "operations/azure/delete-current-version": "delete current version", "operations/azure/delete-if-match-current": "delete if match current", @@ -443,7 +428,6 @@ "operations/azure/list-bad-marker": "list bad marker", "operations/azure/list-bad-marker-code-in-body": "list bad marker, with the error code only in the XML body", "operations/azure/list-container-missing": "list container missing", - "operations/azure/list-containers": "List the containers whose names start with a prefix", "operations/azure/list-delimited": "list delimited", "operations/azure/list-empty": "list empty", "operations/azure/list-encoded-names": "list encoded names", @@ -802,8 +786,6 @@ "operations/s3/copy-source-key-encoded": "Copy from a key with a space, +, %, é, ? and #. x-amz-copy-source percent-encodes every byte of the key outside letters, digits, -._~ and /", "operations/s3/copy-source-version": "Copy an earlier version of an object, named by versionId in x-amz-copy-source", "operations/s3/copy-storage-class": "Copy an object into another storage class, named in x-amz-storage-class", - "operations/s3/create-bucket": "Create a bucket in the region of the endpoint", - "operations/s3/create-bucket-owned": "Refuse to create a bucket that the account already owns", "operations/s3/delete-accepted": "delete accepted", "operations/s3/delete-accepted-key-double-slash": "delete accepted, with the key \"double//slash.txt\"", "operations/s3/delete-accepted-key-hash": "delete accepted, with the key \"hash#tag.txt\"", @@ -813,7 +795,6 @@ "operations/s3/delete-accepted-key-question": "delete accepted, with the key \"question?mark.txt\"", "operations/s3/delete-accepted-key-space": "delete accepted, with the key \"space name.txt\"", "operations/s3/delete-accepted-key-trailing-slash": "delete accepted, with the key \"trailing-slash/\"", - "operations/s3/delete-bucket": "Delete an empty bucket", "operations/s3/delete-bucket-missing": "delete bucket missing", "operations/s3/delete-if-match-current": "delete if match current", "operations/s3/delete-many": "Delete several objects in one request and report each result", @@ -873,8 +854,6 @@ "operations/s3/get-wrong-region": "Report a 301 PermanentRedirect from an endpoint in another region as an error", "operations/s3/get-xml-looking": "get xml looking", "operations/s3/head": "head", - "operations/s3/head-bucket": "Confirm that a bucket exists", - "operations/s3/head-bucket-missing": "Report a bucket that does not exist", "operations/s3/head-committed": "head committed", "operations/s3/head-content-properties": "Return the stored content properties from a HEAD", "operations/s3/head-if-unmodified-since-past": "Refuse a HEAD with 412 when the object changed after If-Unmodified-Since", @@ -893,7 +872,6 @@ "operations/s3/list-all-pages": "Follow each page's continuation token until a page is not truncated", "operations/s3/list-bad-marker": "Report S3's 400 InvalidArgument for a continuation token it did not issue", "operations/s3/list-bucket-missing": "Report 404 NoSuchBucket for a bucket that does not exist", - "operations/s3/list-buckets": "List the buckets whose names start with a prefix", "operations/s3/list-checksum-algorithm": "Report each listed object's checksum algorithm as one name; S3 keeps one checksum per object, the one a write sent or else CRC64NVME, and lists one ChecksumAlgorithm", "operations/s3/list-delimited": "Send the delimiter, and report the keys it groups as common prefixes, not as entries", "operations/s3/list-empty": "Report a prefix with no objects as no entries, no prefixes and an empty continuation token", @@ -6959,744 +6937,6 @@ ], "refusal": null }, - { - "id": "operations/azure/list-containers", - "profile": "azure", - "lane": "core", - "purpose": "List the containers whose names start with a prefix", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2" - ], - "call": { - "op": "azure.list_containers", - "prefix": "otc-listed-" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "GET" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/comp", - "optional": false, - "rule": { - "is": "equal", - "value": "list" - } - }, - { - "at": "/query/prefix", - "optional": false, - "rule": { - "is": "equal", - "value": "otc-listed-" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 200, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - } - }, - "body": { - "encoding": "utf8", - "data": "otc-listed-otc-listed-aMon, 01 Jan 2024 00:00:00 GMT\"fixture-etag\"unlockedavailablefalsefalseotc-listed-bMon, 01 Jan 2024 00:00:00 GMT\"fixture-etag\"unlockedavailablefalsefalse" - }, - "framing": "chunked" - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - }, - { - "at": "/value/containers", - "optional": false, - "rule": { - "is": "equal", - "value": [ - "otc-listed-a", - "otc-listed-b" - ] - } - } - ], - "refusal": null - }, - { - "id": "operations/azure/container-properties-absent", - "profile": "azure", - "lane": "core", - "purpose": "Report a missing container when reading its properties", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties" - ], - "call": { - "container": "otc-absent", - "op": "azure.container_properties" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "GET" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-absent" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 404, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - }, - "x-ms-error-code": "ContainerNotFound" - }, - "body": { - "encoding": "utf8", - "data": "ContainerNotFoundFixture error" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 404 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "ContainerNotFound" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure/container-properties", - "profile": "azure", - "lane": "core", - "purpose": "Read the properties of a container", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties" - ], - "call": { - "container": "otc-read", - "op": "azure.container_properties" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "GET" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-read" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 200, - "headers": { - "date": { - "from": "now" - }, - "etag": "\"fixture-etag\"", - "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT", - "x-ms-has-immutability-policy": "false", - "x-ms-has-legal-hold": "false", - "x-ms-lease-state": "available", - "x-ms-lease-status": "unlocked" - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure/delete-container-absent", - "profile": "azure", - "lane": "core", - "purpose": "Report a missing container on delete", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container" - ], - "call": { - "container": "otc-absent", - "op": "azure.delete_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "DELETE" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-absent" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 404, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - }, - "x-ms-error-code": "ContainerNotFound" - }, - "body": { - "encoding": "utf8", - "data": "ContainerNotFoundFixture error" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 404 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "ContainerNotFound" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure/delete-container", - "profile": "azure", - "lane": "core", - "purpose": "Delete a container", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container" - ], - "call": { - "container": "otc-deleted", - "op": "azure.delete_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "DELETE" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-deleted" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 202, - "headers": { - "date": { - "from": "now" - } - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure/create-container-invalid-name", - "profile": "azure", - "lane": "core", - "purpose": "Refuse a container name with capitals and an underscore", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata" - ], - "call": { - "container": "Otc_Invalid", - "op": "azure.create_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "PUT" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/Otc_Invalid" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 400, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - }, - "x-ms-error-code": "InvalidResourceName" - }, - "body": { - "encoding": "utf8", - "data": "InvalidResourceNameFixture error" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 400 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "InvalidResourceName" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure/create-container-exists", - "profile": "azure", - "lane": "core", - "purpose": "Refuse to create a container that exists", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/create-container" - ], - "call": { - "container": "otc-existing", - "op": "azure.create_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "PUT" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-existing" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 409, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - }, - "x-ms-error-code": "ContainerAlreadyExists" - }, - "body": { - "encoding": "utf8", - "data": "ContainerAlreadyExistsFixture error" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 409 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "ContainerAlreadyExists" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure/create-container", - "profile": "azure", - "lane": "core", - "purpose": "Create a container", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/create-container" - ], - "call": { - "container": "otc-created", - "op": "azure.create_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "PUT" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-created" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 201, - "headers": { - "date": { - "from": "now" - }, - "etag": "\"fixture-etag\"", - "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT" - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, { "id": "operations/azure/get-current-version-of-deleted-object", "profile": "azure", @@ -43798,744 +43038,6 @@ ], "refusal": null }, - { - "id": "operations/azure-hns/list-containers", - "profile": "azure-hns", - "lane": "core", - "purpose": "List the containers whose names start with a prefix", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2" - ], - "call": { - "op": "azure.list_containers", - "prefix": "otc-listed-" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "GET" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/comp", - "optional": false, - "rule": { - "is": "equal", - "value": "list" - } - }, - { - "at": "/query/prefix", - "optional": false, - "rule": { - "is": "equal", - "value": "otc-listed-" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 200, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - } - }, - "body": { - "encoding": "utf8", - "data": "otc-listed-otc-listed-aMon, 01 Jan 2024 00:00:00 GMT\"fixture-etag\"unlockedavailablefalsefalseotc-listed-bMon, 01 Jan 2024 00:00:00 GMT\"fixture-etag\"unlockedavailablefalsefalse" - }, - "framing": "chunked" - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - }, - { - "at": "/value/containers", - "optional": false, - "rule": { - "is": "equal", - "value": [ - "otc-listed-a", - "otc-listed-b" - ] - } - } - ], - "refusal": null - }, - { - "id": "operations/azure-hns/container-properties-absent", - "profile": "azure-hns", - "lane": "core", - "purpose": "Report a missing container when reading its properties", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties" - ], - "call": { - "container": "otc-absent", - "op": "azure.container_properties" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "GET" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-absent" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 404, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - }, - "x-ms-error-code": "ContainerNotFound" - }, - "body": { - "encoding": "utf8", - "data": "ContainerNotFoundFixture error" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 404 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "ContainerNotFound" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure-hns/container-properties", - "profile": "azure-hns", - "lane": "core", - "purpose": "Read the properties of a container", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties" - ], - "call": { - "container": "otc-read", - "op": "azure.container_properties" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "GET" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-read" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 200, - "headers": { - "date": { - "from": "now" - }, - "etag": "\"fixture-etag\"", - "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT", - "x-ms-has-immutability-policy": "false", - "x-ms-has-legal-hold": "false", - "x-ms-lease-state": "available", - "x-ms-lease-status": "unlocked" - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure-hns/delete-container-absent", - "profile": "azure-hns", - "lane": "core", - "purpose": "Report a missing container on delete", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container" - ], - "call": { - "container": "otc-absent", - "op": "azure.delete_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "DELETE" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-absent" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 404, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - }, - "x-ms-error-code": "ContainerNotFound" - }, - "body": { - "encoding": "utf8", - "data": "ContainerNotFoundFixture error" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 404 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "ContainerNotFound" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure-hns/delete-container", - "profile": "azure-hns", - "lane": "core", - "purpose": "Delete a container", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container" - ], - "call": { - "container": "otc-deleted", - "op": "azure.delete_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "DELETE" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-deleted" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 202, - "headers": { - "date": { - "from": "now" - } - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure-hns/create-container-invalid-name", - "profile": "azure-hns", - "lane": "core", - "purpose": "Refuse a container name with capitals and an underscore", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata" - ], - "call": { - "container": "Otc_Invalid", - "op": "azure.create_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "PUT" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/Otc_Invalid" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 400, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - }, - "x-ms-error-code": "InvalidResourceName" - }, - "body": { - "encoding": "utf8", - "data": "InvalidResourceNameFixture error" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 400 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "InvalidResourceName" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure-hns/create-container-exists", - "profile": "azure-hns", - "lane": "core", - "purpose": "Refuse to create a container that exists", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/create-container" - ], - "call": { - "container": "otc-existing", - "op": "azure.create_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "PUT" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-existing" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 409, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - }, - "x-ms-error-code": "ContainerAlreadyExists" - }, - "body": { - "encoding": "utf8", - "data": "ContainerAlreadyExistsFixture error" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 409 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "ContainerAlreadyExists" - } - } - ], - "refusal": null - }, - { - "id": "operations/azure-hns/create-container", - "profile": "azure-hns", - "lane": "core", - "purpose": "Create a container", - "sources": [ - "https://learn.microsoft.com/en-us/rest/api/storageservices/create-container" - ], - "call": { - "container": "otc-created", - "op": "azure.create_container" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "PUT" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/otc-created" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/restype", - "optional": false, - "rule": { - "is": "equal", - "value": "container" - } - } - ], - "allow_headers": [], - "allow_query": [], - "response": { - "status": 201, - "headers": { - "date": { - "from": "now" - }, - "etag": "\"fixture-etag\"", - "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT" - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, { "id": "operations/azure-hns/get-current-version-of-deleted-object", "profile": "azure-hns", @@ -84094,90 +82596,15 @@ "refusal": null }, { - "id": "operations/s3/delete-accepted-key-non-ascii", - "profile": "s3", - "lane": "core", - "purpose": "delete accepted, with the key \"café/雪.txt\"", - "sources": [ - "aws-sdk-cpp/generated/src/aws-cpp-sdk-s3-crt" - ], - "call": { - "key": "object-tests/keys/café/雪.txt", - "op": "delete" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "DELETE" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/fixture/object-tests/keys/café/雪.txt" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - } - ], - "allow_headers": [ - "content-type" - ], - "allow_query": [], - "response": { - "status": 204, - "headers": { - "date": { - "from": "now" - }, - "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT" - }, - "body": { - "encoding": "base64", - "data": "" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, - { - "id": "operations/s3/delete-accepted-key-double-slash", + "id": "operations/s3/delete-accepted-key-non-ascii", "profile": "s3", "lane": "core", - "purpose": "delete accepted, with the key \"double//slash.txt\"", + "purpose": "delete accepted, with the key \"café/雪.txt\"", "sources": [ "aws-sdk-cpp/generated/src/aws-cpp-sdk-s3-crt" ], "call": { - "key": "object-tests/keys/double//slash.txt", + "key": "object-tests/keys/café/雪.txt", "op": "delete" }, "exchanges": [ @@ -84198,7 +82625,7 @@ "optional": false, "rule": { "is": "equal", - "value": "/fixture/object-tests/keys/double//slash.txt" + "value": "/fixture/object-tests/keys/café/雪.txt" } }, { @@ -84244,15 +82671,15 @@ "refusal": null }, { - "id": "operations/s3/delete-accepted-key-trailing-slash", + "id": "operations/s3/delete-accepted-key-double-slash", "profile": "s3", "lane": "core", - "purpose": "delete accepted, with the key \"trailing-slash/\"", + "purpose": "delete accepted, with the key \"double//slash.txt\"", "sources": [ "aws-sdk-cpp/generated/src/aws-cpp-sdk-s3-crt" ], "call": { - "key": "object-tests/keys/trailing-slash/", + "key": "object-tests/keys/double//slash.txt", "op": "delete" }, "exchanges": [ @@ -84273,7 +82700,7 @@ "optional": false, "rule": { "is": "equal", - "value": "/fixture/object-tests/keys/trailing-slash/" + "value": "/fixture/object-tests/keys/double//slash.txt" } }, { @@ -84319,16 +82746,16 @@ "refusal": null }, { - "id": "operations/s3/delete-bucket", + "id": "operations/s3/delete-accepted-key-trailing-slash", "profile": "s3", "lane": "core", - "purpose": "Delete an empty bucket", + "purpose": "delete accepted, with the key \"trailing-slash/\"", "sources": [ - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html" + "aws-sdk-cpp/generated/src/aws-cpp-sdk-s3-crt" ], "call": { - "bucket": "object-tests-deleted", - "op": "s3.delete_bucket" + "key": "object-tests/keys/trailing-slash/", + "op": "delete" }, "exchanges": [ { @@ -84348,7 +82775,7 @@ "optional": false, "rule": { "is": "equal", - "value": "/object-tests-deleted" + "value": "/fixture/object-tests/keys/trailing-slash/" } }, { @@ -84369,10 +82796,12 @@ "headers": { "date": { "from": "now" - } + }, + "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT" }, "body": { - "encoding": "empty" + "encoding": "base64", + "data": "" } } } @@ -95577,247 +94006,92 @@ "optional": false, "rule": { "is": "equal", - "value": 412 - } - } - ], - "refusal": null - }, - { - "id": "operations/s3/head-storage-class", - "profile": "s3", - "lane": "core", - "purpose": "Read the storage class of an object", - "sources": [ - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html" - ], - "call": { - "key": "object-tests/classes/object.txt", - "op": "head" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "HEAD" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/fixture/object-tests/classes/object.txt" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - } - ], - "allow_headers": [ - "content-type" - ], - "allow_query": [], - "response": { - "status": 200, - "headers": { - "content-length": "5", - "date": { - "from": "now" - }, - "etag": "\"fixture-etag\"", - "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT", - "x-amz-storage-class": "STANDARD_IA" - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - }, - { - "at": "/value/storage_class", - "optional": false, - "rule": { - "is": "equal", - "value": "STANDARD_IA" - } - } - ], - "refusal": null - }, - { - "id": "operations/s3/head-bucket", - "profile": "s3", - "lane": "core", - "purpose": "Confirm that a bucket exists", - "sources": [ - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html" - ], - "call": { - "bucket": "fixture", - "op": "s3.head_bucket" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "HEAD" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/fixture" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - } - ], - "allow_headers": [ - "content-type" - ], - "allow_query": [], - "response": { - "status": 200, - "headers": { - "date": { - "from": "now" - }, - "x-amz-bucket-region": "eu-central-1" - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, - { - "id": "operations/s3/head-bucket-missing", - "profile": "s3", - "lane": "core", - "purpose": "Report a bucket that does not exist", - "sources": [ - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html" - ], - "call": { - "bucket": "object-tests-absent", - "op": "s3.head_bucket" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "HEAD" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/object-tests-absent" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - } - ], - "allow_headers": [ - "content-type" - ], - "allow_query": [], - "response": { - "status": 404, - "headers": { - "date": { - "from": "now" - } - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 404 + "value": 412 + } + } + ], + "refusal": null + }, + { + "id": "operations/s3/head-storage-class", + "profile": "s3", + "lane": "core", + "purpose": "Read the storage class of an object", + "sources": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html" + ], + "call": { + "key": "object-tests/classes/object.txt", + "op": "head" + }, + "exchanges": [ + { + "alternatives": [ + { + "request": [ + { + "at": "/method", + "optional": false, + "rule": { + "is": "equal", + "value": "HEAD" + } + }, + { + "at": "/path", + "optional": false, + "rule": { + "is": "equal", + "value": "/fixture/object-tests/classes/object.txt" + } + }, + { + "at": "/body_base64", + "optional": false, + "rule": { + "is": "equal", + "value": "" + } + } + ], + "allow_headers": [ + "content-type" + ], + "allow_query": [], + "response": { + "status": 200, + "headers": { + "content-length": "5", + "date": { + "from": "now" + }, + "etag": "\"fixture-etag\"", + "last-modified": "Mon, 01 Jan 2024 00:00:00 GMT", + "x-amz-storage-class": "STANDARD_IA" + }, + "body": { + "encoding": "empty" + } + } + } + ] + } + ], + "expect": [ + { + "at": "/outcome", + "optional": false, + "rule": { + "is": "equal", + "value": "ok" + } + }, + { + "at": "/value/storage_class", + "optional": false, + "rule": { + "is": "equal", + "value": "STANDARD_IA" } } ], @@ -99087,101 +97361,6 @@ ], "refusal": null }, - { - "id": "operations/s3/list-buckets", - "profile": "s3", - "lane": "core", - "purpose": "List the buckets whose names start with a prefix", - "sources": [ - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html" - ], - "call": { - "op": "s3.list_buckets", - "prefix": "object-tests-listed-" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "GET" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/" - } - }, - { - "at": "/body_base64", - "optional": false, - "rule": { - "is": "equal", - "value": "" - } - }, - { - "at": "/query/prefix", - "optional": false, - "rule": { - "is": "equal", - "value": "object-tests-listed-" - } - } - ], - "allow_headers": [ - "content-type" - ], - "allow_query": [], - "response": { - "status": 200, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - } - }, - "body": { - "encoding": "utf8", - "data": "\nfixture-ownerobject-tests-listed-a2024-01-01T00:00:00.000Zeu-central-1object-tests-listed-b2024-01-01T00:00:00.000Zeu-central-1object-tests-listed-" - }, - "framing": "chunked" - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - }, - { - "at": "/value/buckets", - "optional": false, - "rule": { - "is": "equal", - "value": [ - "object-tests-listed-a", - "object-tests-listed-b" - ] - } - } - ], - "refusal": null - }, { "id": "operations/s3/list-service-unavailable", "profile": "s3", @@ -109758,174 +107937,6 @@ ], "refusal": null }, - { - "id": "operations/s3/create-bucket-owned", - "profile": "s3", - "lane": "core", - "purpose": "Refuse to create a bucket that the account already owns", - "sources": [ - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html" - ], - "call": { - "bucket": "fixture", - "location": "eu-central-1", - "op": "s3.create_bucket" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "PUT" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/fixture" - } - }, - { - "at": "/body_text", - "optional": false, - "rule": { - "is": "xml", - "value": "eu-central-1" - } - } - ], - "allow_headers": [ - "content-type" - ], - "allow_query": [], - "response": { - "status": 409, - "headers": { - "content-type": "application/xml", - "date": { - "from": "now" - } - }, - "body": { - "encoding": "utf8", - "data": "\nBucketAlreadyOwnedByYouFixture error" - }, - "framing": "chunked" - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "error" - } - }, - { - "at": "/status", - "optional": false, - "rule": { - "is": "equal", - "value": 409 - } - }, - { - "at": "/code", - "optional": false, - "rule": { - "is": "equal", - "value": "BucketAlreadyOwnedByYou" - } - } - ], - "refusal": null - }, - { - "id": "operations/s3/create-bucket", - "profile": "s3", - "lane": "core", - "purpose": "Create a bucket in the region of the endpoint", - "sources": [ - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html" - ], - "call": { - "bucket": "object-tests-created", - "location": "eu-central-1", - "op": "s3.create_bucket" - }, - "exchanges": [ - { - "alternatives": [ - { - "request": [ - { - "at": "/method", - "optional": false, - "rule": { - "is": "equal", - "value": "PUT" - } - }, - { - "at": "/path", - "optional": false, - "rule": { - "is": "equal", - "value": "/object-tests-created" - } - }, - { - "at": "/body_text", - "optional": false, - "rule": { - "is": "xml", - "value": "eu-central-1" - } - } - ], - "allow_headers": [ - "content-type" - ], - "allow_query": [], - "response": { - "status": 200, - "headers": { - "date": { - "from": "now" - }, - "location": "/object-tests-created" - }, - "body": { - "encoding": "empty" - } - } - } - ] - } - ], - "expect": [ - { - "at": "/outcome", - "optional": false, - "rule": { - "is": "equal", - "value": "ok" - } - } - ], - "refusal": null - }, { "id": "operations/s3/copy-missing-source", "profile": "s3", diff --git a/tests/grading.rs b/tests/grading.rs index fa288f3..4fb4ff8 100644 --- a/tests/grading.rs +++ b/tests/grading.rs @@ -35,7 +35,12 @@ fn create_get_request() -> Value { #[test] fn corpus_is_strict_and_valid() { - for file in ["operations.json", "vectors.json", "live.json"] { + for file in [ + "operations.json", + "management.json", + "vectors.json", + "live.json", + ] { Suite::load(format!("{}/cases/{file}", env!("CARGO_MANIFEST_DIR"))).unwrap(); } let mut suite_json = serde_json::to_value(load_test_suite()).unwrap();