From 5aa876e9c8a7eb2855c52838d15011647bc10fbc Mon Sep 17 00:00:00 2001 From: David Miller <45697098+dlm6693@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:40:54 -0400 Subject: [PATCH] updated vanilla test files and rename provider test file (#2767) --- .../is-virtual-hostable-s3-bucket.json | 29 ++++++++++++++++++- .../endpoints/test-cases/valid-hostlabel.json | 9 ++++++ ...points_v2.py => test_endpoint_provider.py} | 0 3 files changed, 37 insertions(+), 1 deletion(-) rename tests/unit/{test_endpoints_v2.py => test_endpoint_provider.py} (100%) diff --git a/tests/unit/data/endpoints/test-cases/is-virtual-hostable-s3-bucket.json b/tests/unit/data/endpoints/test-cases/is-virtual-hostable-s3-bucket.json index 9641304ace..f67cc6147b 100644 --- a/tests/unit/data/endpoints/test-cases/is-virtual-hostable-s3-bucket.json +++ b/tests/unit/data/endpoints/test-cases/is-virtual-hostable-s3-bucket.json @@ -116,6 +116,33 @@ "expect": { "error": "not isVirtualHostableS3Bucket" } + }, + { + "documentation": "192.168.5.4: not isVirtualHostable (formatted like an ip address)", + "params": { + "BucketName": "192.168.5.4" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "bucket-.name: not isVirtualHostable (invalid label, ends with a -)", + "params": { + "BucketName": "bucket-.name" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "bucket.-name: not isVirtualHostable (invalid label, starts with a -)", + "params": { + "BucketName": "bucket.-name" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } } ] -} \ No newline at end of file +} diff --git a/tests/unit/data/endpoints/test-cases/valid-hostlabel.json b/tests/unit/data/endpoints/test-cases/valid-hostlabel.json index 70f148d4b1..82287b727b 100644 --- a/tests/unit/data/endpoints/test-cases/valid-hostlabel.json +++ b/tests/unit/data/endpoints/test-cases/valid-hostlabel.json @@ -42,6 +42,15 @@ "expect": { "error": "Invalid hostlabel" } + }, + { + "documentation": "an empty string is not a valid hostlabel", + "params": { + "Region": "" + }, + "expect": { + "error": "Invalid hostlabel" + } } ] } diff --git a/tests/unit/test_endpoints_v2.py b/tests/unit/test_endpoint_provider.py similarity index 100% rename from tests/unit/test_endpoints_v2.py rename to tests/unit/test_endpoint_provider.py