Debian Codegraph @

crt/aws-c-sdkutils/tests/resources/test-cases/is-virtual-hostable-s3-bucket.json

raw symbols SCIP
1 {
2 "version": "1.0",
3 "testCases": [
4 {
5 "documentation": "bucket-name: isVirtualHostable",
6 "params": {
7 "BucketName": "bucket-name"
8 },
9 "expect": {
10 "endpoint": {
11 "url": "https://bucket-name.s3.amazonaws.com"
12 }
13 }
14 },
15 {
16 "documentation": "bucket-with-number-1: isVirtualHostable",
17 "params": {
18 "BucketName": "bucket-with-number-1"
19 },
20 "expect": {
21 "endpoint": {
22 "url": "https://bucket-with-number-1.s3.amazonaws.com"
23 }
24 }
25 },
26 {
27 "documentation": "BucketName: not isVirtualHostable (uppercase characters)",
28 "params": {
29 "BucketName": "BucketName"
30 },
31 "expect": {
32 "error": "not isVirtualHostableS3Bucket"
33 }
34 },
35 {
36 "documentation": "bucket_name: not isVirtualHostable (underscore)",
37 "params": {
38 "BucketName": "bucket_name"
39 },
40 "expect": {
41 "error": "not isVirtualHostableS3Bucket"
42 }
43 },
44 {
45 "documentation": "bucket.name: isVirtualHostable (http only)",
46 "params": {
47 "BucketName": "bucket.name"
48 },
49 "expect": {
50 "endpoint": {
51 "url": "http://bucket.name.s3.amazonaws.com"
52 }
53 }
54 },
55 {
56 "documentation": "bucket.name.multiple.dots1: isVirtualHostable (http only)",
57 "params": {
58 "BucketName": "bucket.name.multiple.dots1"
59 },
60 "expect": {
61 "endpoint": {
62 "url": "http://bucket.name.multiple.dots1.s3.amazonaws.com"
63 }
64 }
65 },
66 {
67 "documentation": "-bucket-name: not isVirtualHostable (leading dash)",
68 "params": {
69 "BucketName": "-bucket-name"
70 },
71 "expect": {
72 "error": "not isVirtualHostableS3Bucket"
73 }
74 },
75 {
76 "documentation": "bucket-name-: not isVirtualHostable (trailing dash)",
77 "params": {
78 "BucketName": "bucket-name-"
79 },
80 "expect": {
81 "error": "not isVirtualHostableS3Bucket"
82 }
83 },
84 {
85 "documentation": "aa: not isVirtualHostable (< 3 characters)",
86 "params": {
87 "BucketName": "aa"
88 },
89 "expect": {
90 "error": "not isVirtualHostableS3Bucket"
91 }
92 },
93 {
94 "documentation": "'a'*64: not isVirtualHostable (> 63 characters)",
95 "params": {
96 "BucketName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
97 },
98 "expect": {
99 "error": "not isVirtualHostableS3Bucket"
100 }
101 },
102 {
103 "documentation": ".bucket-name: not isVirtualHostable (leading dot)",
104 "params": {
105 "BucketName": ".bucket-name"
106 },
107 "expect": {
108 "error": "not isVirtualHostableS3Bucket"
109 }
110 },
111 {
112 "documentation": "bucket-name.: not isVirtualHostable (trailing dot)",
113 "params": {
114 "BucketName": "bucket-name."
115 },
116 "expect": {
117 "error": "not isVirtualHostableS3Bucket"
118 }
119 },
120 {
121 "documentation": "192.168.5.4: not isVirtualHostable (formatted like an ip address)",
122 "params": {
123 "BucketName": "192.168.5.4"
124 },
125 "expect": {
126 "error": "not isVirtualHostableS3Bucket"
127 }
128 },
129 {
130 "documentation": "bucket-.name: not isVirtualHostable (invalid label, ends with a -)",
131 "params": {
132 "BucketName": "bucket-.name"
133 },
134 "expect": {
135 "error": "not isVirtualHostableS3Bucket"
136 }
137 },
138 {
139 "documentation": "bucket.-name: not isVirtualHostable (invalid label, starts with a -)",
140 "params": {
141 "BucketName": "bucket.-name"
142 },
143 "expect": {
144 "error": "not isVirtualHostableS3Bucket"
145 }
146 }
147 ]
148 }