Skip to content

Commit

Permalink
Add V2 cert test
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-akamai committed Jan 8, 2025
1 parent 291000f commit b90f3cf
Show file tree
Hide file tree
Showing 2 changed files with 167 additions and 30 deletions.
184 changes: 154 additions & 30 deletions test/integration/fixtures/TestObjectStorageBucketCert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ interactions:
url: https://api.linode.com/v4beta/object-storage/endpoints?page=1
method: GET
response:
body: '{"pages": 1, "page": 1, "results": 18, "data": [{"region": "id-cgk", "endpoint_type":
"E1", "s3_endpoint": "id-cgk-1.linodeobjects.com"}, {"region": "nl-ams", "endpoint_type":
"E1", "s3_endpoint": "nl-ams-1.linodeobjects.com"}, {"region": "es-mad", "endpoint_type":
"E1", "s3_endpoint": "es-mad-1.linodeobjects.com"}, {"region": "us-ord", "endpoint_type":
"E1", "s3_endpoint": "us-ord-1.linodeobjects.com"}, {"region": "us-east", "endpoint_type":
"E0", "s3_endpoint": "us-east-1.linodeobjects.com"}, {"region": "se-sto", "endpoint_type":
"E1", "s3_endpoint": "se-sto-1.linodeobjects.com"}, {"region": "us-southeast",
"endpoint_type": "E0", "s3_endpoint": "us-southeast-1.linodeobjects.com"}, {"region":
"ap-south", "endpoint_type": "E0", "s3_endpoint": "ap-south-1.linodeobjects.com"},
{"region": "it-mil", "endpoint_type": "E1", "s3_endpoint": "it-mil-1.linodeobjects.com"},
{"region": "in-maa", "endpoint_type": "E1", "s3_endpoint": "in-maa-1.linodeobjects.com"},
body: '{"pages": 1, "page": 1, "results": 18, "data": [{"region": "es-mad", "endpoint_type":
"E1", "s3_endpoint": "es-mad-1.linodeobjects.com"}, {"region": "fr-par", "endpoint_type":
"E1", "s3_endpoint": "fr-par-1.linodeobjects.com"}, {"region": "us-east", "endpoint_type":
"E0", "s3_endpoint": "us-east-1.linodeobjects.com"}, {"region": "ap-south",
"endpoint_type": "E0", "s3_endpoint": "ap-south-1.linodeobjects.com"}, {"region":
"id-cgk", "endpoint_type": "E1", "s3_endpoint": "id-cgk-1.linodeobjects.com"},
{"region": "nl-ams", "endpoint_type": "E1", "s3_endpoint": "nl-ams-1.linodeobjects.com"},
{"region": "us-mia", "endpoint_type": "E1", "s3_endpoint": "us-mia-1.linodeobjects.com"},
{"region": "us-sea", "endpoint_type": "E1", "s3_endpoint": "us-sea-1.linodeobjects.com"},
{"region": "jp-osa", "endpoint_type": "E1", "s3_endpoint": "jp-osa-1.linodeobjects.com"},
{"region": "us-ord", "endpoint_type": "E1", "s3_endpoint": "us-ord-1.linodeobjects.com"},
{"region": "se-sto", "endpoint_type": "E1", "s3_endpoint": "se-sto-1.linodeobjects.com"},
{"region": "us-southeast", "endpoint_type": "E0", "s3_endpoint": "us-southeast-1.linodeobjects.com"},
{"region": "in-maa", "endpoint_type": "E1", "s3_endpoint": "in-maa-1.linodeobjects.com"},
{"region": "it-mil", "endpoint_type": "E1", "s3_endpoint": "it-mil-1.linodeobjects.com"},
{"region": "br-gru", "endpoint_type": "E1", "s3_endpoint": "br-gru-1.linodeobjects.com"},
{"region": "eu-central", "endpoint_type": "E0", "s3_endpoint": "eu-central-1.linodeobjects.com"},
{"region": "us-lax", "endpoint_type": "E1", "s3_endpoint": "us-lax-1.linodeobjects.com"},
{"region": "us-mia", "endpoint_type": "E1", "s3_endpoint": "us-mia-1.linodeobjects.com"},
{"region": "us-iad", "endpoint_type": "E1", "s3_endpoint": "us-iad-1.linodeobjects.com"},
{"region": "fr-par", "endpoint_type": "E1", "s3_endpoint": "fr-par-1.linodeobjects.com"},
{"region": "br-gru", "endpoint_type": "E1", "s3_endpoint": "br-gru-1.linodeobjects.com"},
{"region": "jp-osa", "endpoint_type": "E1", "s3_endpoint": "jp-osa-1.linodeobjects.com"}]}'
{"region": "us-lax", "endpoint_type": "E1", "s3_endpoint": "us-lax-1.linodeobjects.com"}]}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -55,7 +55,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Wed, 08 Jan 2025 06:02:29 GMT
- Wed, 08 Jan 2025 07:05:13 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand All @@ -81,7 +81,7 @@ interactions:
code: 200
duration: ""
- request:
body: '{"region":"id-cgk","label":"linode-obj-bucket-cert-test.xyz","endpoint_type":"E1"}'
body: '{"region":"es-mad","label":"linode-obj-bucket-cert-test.xyz","endpoint_type":"E1"}'
form: {}
headers:
Accept:
Expand All @@ -93,10 +93,10 @@ interactions:
url: https://api.linode.com/v4beta/object-storage/buckets
method: POST
response:
body: '{"hostname": "linode-obj-bucket-cert-test.xyz.id-cgk-1.linodeobjects.com",
body: '{"hostname": "linode-obj-bucket-cert-test.xyz.es-mad-1.linodeobjects.com",
"label": "linode-obj-bucket-cert-test.xyz", "created": "2018-01-02T03:04:05",
"region": "id-cgk", "cluster": "id-cgk-1", "size": 0, "objects": 0, "endpoint_type":
"E1", "s3_endpoint": "id-cgk-1.linodeobjects.com"}'
"region": "es-mad", "cluster": "es-mad-1", "size": 0, "objects": 0, "endpoint_type":
"E1", "s3_endpoint": "es-mad-1.linodeobjects.com"}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -121,7 +121,131 @@ interactions:
Content-Type:
- application/json
Expires:
- Wed, 08 Jan 2025 06:02:33 GMT
- Wed, 08 Jan 2025 07:05:16 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- object_storage:read_write
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "1600"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""
- request:
body: '{"certificate":"-----BEGIN CERTIFICATE-----\nMIIF3DCCA8QCCQC0dUFu1HvjazANBgkqhkiG9w0BAQsFADCBrzELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAlBBMRUwEwYDVQQHDAxQaGlsY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ih+Vl9W9rDeKAd95ciII9CxBqOvsso8zqDAEV25fn3tutk/7hQNMqv0APAah\nLo/eY1NK9i9YVJknVSzWBkE2MUyvpfFhiw6TPYh88qH+wN3CznWaCtXiAjH3kbOk\n6y2OmI8+4QIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQCP2UawP8GDWxyMOsHDPqKp\nPtedCxPpEPsQm8KMnt5KJ55NFqTcpARz1miHXT1aBedu9IoqxvTP4g8BQ4QFjP2s\nddNu2WKqnwyzkCtnB2zOrOKlvUtRAZ4x2iyhKNqls6D7I4tw22HMbTzW2TVeuGVa\noiRtawFcUsjSAcarRw6swLTln+BK54dWa9E5hiulBoHLosMWCEyUDrUnaiB+2+7C\nbsExYZTXRlii7YPSr46zPmte2iKa1+b0g5DXkzSazWp+R/dlGYp84uLWk71e4b/9\nSo1pIitPasCJHgO/ii9nIcmDXarkaGT5CEUP8WPp6mLY5W9NxgF2czdz6AMJa3P9\n2jNd4J1VFl8k+LDZ4GnwHGhyL3h3lFUmmoQV/0YVoXmA59SxE2JPvc2d1V6xh2gz\nyg2M+xcKliSXxshhAopsSSoEp5g3II2mCvzeSxwsXa4Ob5c5TJNdXslm1pugRCbB\ntjFNh70wZmCq+jY8C+vGsDwkf/5UeAd+c+14s3bwsBfWqZBGokVxyf/UWHtsWlVn\np3USWBwLxEWyQIioMmj4O6wROZeyePDlFDVky4hzTCrTS6EFIqkGBs5RneCHhTN0\ngNHFG8Ixql6mybJAwopvWGEL+7E4pbNdbhmgVvf2YEQuMZBCM7fGdBsRNkTs6jIA\n/8soO6buQgQoCq3GFbodZA==\n-----END
CERTIFICATE-----\n","private_key":"-----BEGIN PRIVATE KEY-----\nMIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCy4LqfRYXE314e\n6YkpR1BbKPH8ohO4lcMt+YzMUNlOC1KUktGjX8pWk4wAXYar7Mxccmbbh68pgE8i\nSio8V97CdQb8O64OQmre/y33z7Yts37/6mH5mBnfei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GtCAFhipKO+UVa0uEJGiy+WMCUhzb7RVu/MoKOSodDXtdJMgixG0\nE3boijEdXYRMXB6XQ3IefVlGTs10d1qEMnvctbX/6degoz82Nmp6Sy17g50n0+tE\nveT12+4+tGkSTQOtvYJhadaf45kNmsgJO5iUTKRsDJgSEKhIVhqvhAm1Z/+d4Qzf\nDzKvpvqdoMnho6CDF3r+kpiHxG0hzQafWQUcmt8CggEARD1461hNY71rEyHhiPXV\nEnGP4cXYvrxDQ45xTLJmA3o5p4vPQn4ZYe1WIkmxC7hDhNR3RfgGJzR1sKH2zSHw\ne+ZMcR3lZ7jNPbZAPu/W07M0W/vHsCyxeRkRpET3rBetqBzWNfqeGtjRYK2+oobL\nSwn81uihCK4mf6U09ZlFKfyj1WX82nJ/BUSHVC5rkbA348SUT3dwBKp7A3UDfKP2\n4yBidLVwErShOYcBZA2sbEsfkbv0S9wL4E7CCq2KyX2YyNn63MYBqcuCYo/yZlv2\n5igV8NEVZibV4WA3svEGoboxKM5qfTCnYWvC9QeImIuYLEibGTRdlXVnYGZqoosx\nXQKCAQEAmEbm8o37QaSMWYu/hixusHWprPRpEcz8qMmpenCTUeE7xgKeJupSx/2u\ns5WSGJy7U6jlmocMOsZ3/nPWNG219uWMUWz2REKi99KOHU7dT8N0OPigNzDBJFKe\nuJpHU2wWkg9CJtkDlQt+4/JP3gzskwpooRvUaEbsQkM0G/A1SMVSyYPuzBui3+E7\nHMuBpZsWkNKLh0hjC5i7YBZYtXGYPG2JCEE4mpiV8ClxTvmijsr8sYUOtnmIBXfG\n0fcsLA4W7xYCUqr74LA1dMQd6f8T00mZycR5eh0wXJ68i5QEotBTGS8ibTilUJbx\n7aJXvW2Q3oCt1sF576QNr9rLxhHl8A==\n-----END
PRIVATE KEY-----\n"}'
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/object-storage/buckets/es-mad/linode-obj-bucket-cert-test.xyz/ssl
method: POST
response:
body: '{"ssl": true}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "13"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Wed, 08 Jan 2025 07:05:19 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- object_storage:read_write
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- '*'
X-Ratelimit-Limit:
- "1600"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""
- request:
body: ""
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/object-storage/buckets/es-mad/linode-obj-bucket-cert-test.xyz/ssl
method: DELETE
response:
body: '{}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "2"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Wed, 08 Jan 2025 07:05:20 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -156,7 +280,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/object-storage/buckets/id-cgk/linode-obj-bucket-cert-test.xyz/ssl
url: https://api.linode.com/v4beta/object-storage/buckets/es-mad/linode-obj-bucket-cert-test.xyz/ssl
method: POST
response:
body: '{"ssl": true}'
Expand Down Expand Up @@ -184,7 +308,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Wed, 08 Jan 2025 06:02:37 GMT
- Wed, 08 Jan 2025 07:05:23 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -217,7 +341,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/object-storage/buckets/id-cgk/linode-obj-bucket-cert-test.xyz/ssl
url: https://api.linode.com/v4beta/object-storage/buckets/es-mad/linode-obj-bucket-cert-test.xyz/ssl
method: GET
response:
body: '{"ssl": true}'
Expand Down Expand Up @@ -245,7 +369,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Wed, 08 Jan 2025 06:02:40 GMT
- Wed, 08 Jan 2025 07:05:25 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -279,7 +403,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/object-storage/buckets/id-cgk/linode-obj-bucket-cert-test.xyz/ssl
url: https://api.linode.com/v4beta/object-storage/buckets/es-mad/linode-obj-bucket-cert-test.xyz/ssl
method: DELETE
response:
body: '{}'
Expand Down Expand Up @@ -307,7 +431,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Wed, 08 Jan 2025 06:02:43 GMT
- Wed, 08 Jan 2025 07:05:28 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -340,7 +464,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/object-storage/buckets/id-cgk/linode-obj-bucket-cert-test.xyz
url: https://api.linode.com/v4beta/object-storage/buckets/es-mad/linode-obj-bucket-cert-test.xyz
method: DELETE
response:
body: '{}'
Expand Down Expand Up @@ -368,7 +492,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Wed, 08 Jan 2025 06:02:48 GMT
- Wed, 08 Jan 2025 07:05:31 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down
13 changes: 13 additions & 0 deletions test/integration/object_storage_bucket_certs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ func TestObjectStorageBucketCert_smoke(t *testing.T) {
t.Fatalf("failed to upload bucket cert: %s", err)
}

err = client.DeleteObjectStorageBucketCert(context.TODO(), bucket.Region, bucket.Label)
if err != nil {
t.Fatalf("failed to upload bucket cert: %s", err)
}

_, err = client.UploadObjectStorageBucketCertV2(context.TODO(), bucket.Region, bucket.Label, linodego.ObjectStorageBucketCertUploadOptions{
Certificate: testCertifcate,
PrivateKey: testPrivateKey,
})
if err != nil {
t.Fatalf("failed to upload bucket cert: %s", err)
}

defer func() {
if err := client.DeleteObjectStorageBucketCert(context.TODO(), bucket.Region, bucket.Label); err != nil {
t.Errorf("failed to delete bucket cert: %s", err)
Expand Down

0 comments on commit b90f3cf

Please sign in to comment.