Skip to content

Commit

Permalink
Add format_version argument
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Feb 4, 2017
1 parent 5679605 commit 6ae4cf1
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 66 deletions.
40 changes: 20 additions & 20 deletions fixtures/s3s/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ interactions:
form: {}
headers:
Fastly-Key:
- d631487398e146a8593ddd71d384c7e6
- 2d150df799bdabefa664a2182f85820a
User-Agent:
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.6.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/607/logging/s3/test-s3
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.8rc2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/615/logging/s3/test-s3
method: DELETE
response:
body: '{"msg":"Record not found","detail":"Couldn''t find syslog ''{ version =>
607, name => test-s3, deleted => 0000-00-00 00:00:00, service => 7i6HN3TK9wS159v2gPAZ8A
}''"}'
body: '{"msg":"Record not found","detail":"Couldn''t find syslog ''{ version =\u003e
615, name =\u003e test-s3, deleted =\u003e 0000-00-00 00:00:00, service =\u003e
7i6HN3TK9wS159v2gPAZ8A }''"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -23,11 +23,11 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 29 Jun 2016 22:27:46 GMT
- Sat, 04 Feb 2017 17:03:14 GMT
Fastly-Ratelimit-Remaining:
- "879"
- "995"
Fastly-Ratelimit-Reset:
- "1467241200"
- "1486231200"
Status:
- 404 Not Found
Vary:
Expand All @@ -40,23 +40,23 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- app-slwdc9051-SL, cache-ord1730-ORD
- app-slwdc9050-SL, cache-iad2621-IAD
status: 404 Not Found
code: 404
- request:
body: ""
form: {}
headers:
Fastly-Key:
- d631487398e146a8593ddd71d384c7e6
- 2d150df799bdabefa664a2182f85820a
User-Agent:
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.6.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/607/logging/s3/new-test-s3
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.8rc2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/615/logging/s3/new-test-s3
method: DELETE
response:
body: '{"msg":"Record not found","detail":"Couldn''t find syslog ''{ version =>
607, name => new-test-s3, deleted => 0000-00-00 00:00:00, service => 7i6HN3TK9wS159v2gPAZ8A
}''"}'
body: '{"msg":"Record not found","detail":"Couldn''t find syslog ''{ version =\u003e
615, name =\u003e new-test-s3, deleted =\u003e 0000-00-00 00:00:00, service
=\u003e 7i6HN3TK9wS159v2gPAZ8A }''"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -65,11 +65,11 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 29 Jun 2016 22:27:47 GMT
- Sat, 04 Feb 2017 17:03:14 GMT
Fastly-Ratelimit-Remaining:
- "877"
- "994"
Fastly-Ratelimit-Reset:
- "1467241200"
- "1486231200"
Status:
- 404 Not Found
Vary:
Expand All @@ -82,6 +82,6 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- app-slwdc9051-SL, cache-ord1730-ORD
- app-slwdc9050-SL, cache-iad2621-IAD
status: 404 Not Found
code: 404
22 changes: 12 additions & 10 deletions fixtures/s3s/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
version: 1
interactions:
- request:
body: Service=7i6HN3TK9wS159v2gPAZ8A&Version=607&access_key=access_key&bucket_name=bucket-name&domain=s3-website-us-west-2.amazonaws.com&format=format&gzip_level=9&name=test-s3&path=%2Fpath&period=12&redundancy=reduced_redundancy&secret_key=secret_key&timestamp_format=%25Y
body: Service=7i6HN3TK9wS159v2gPAZ8A&Version=615&access_key=access_key&bucket_name=bucket-name&domain=s3-website-us-west-2.amazonaws.com&format=format&format_version=2&gzip_level=9&name=test-s3&path=%2Fpath&period=12&redundancy=reduced_redundancy&secret_key=secret_key&timestamp_format=%25Y
form:
Service:
- 7i6HN3TK9wS159v2gPAZ8A
Version:
- "607"
- "615"
access_key:
- access_key
bucket_name:
Expand All @@ -16,6 +16,8 @@ interactions:
- s3-website-us-west-2.amazonaws.com
format:
- format
format_version:
- "2"
gzip_level:
- "9"
name:
Expand All @@ -34,13 +36,13 @@ interactions:
Content-Type:
- application/x-www-form-urlencoded
Fastly-Key:
- d631487398e146a8593ddd71d384c7e6
- 2d150df799bdabefa664a2182f85820a
User-Agent:
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.6.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/607/logging/s3
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.8rc2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/615/logging/s3
method: POST
response:
body: '{"access_key":"access_key","bucket_name":"bucket-name","domain":"s3-website-us-west-2.amazonaws.com","format":"format","gzip_level":"9","name":"test-s3","path":"/path","period":"12","redundancy":"reduced_redundancy","secret_key":"secret_key","timestamp_format":"%Y","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"607","format_version":"1","response_condition":"","server_side_encryption_kms_key_id":null,"public_key":null,"updated_at":"2016-06-29T22:27:43+00:00","message_type":"classic","server_side_encryption":null,"deleted_at":null,"created_at":"2016-06-29T22:27:43+00:00"}'
body: '{"access_key":"access_key","bucket_name":"bucket-name","domain":"s3-website-us-west-2.amazonaws.com","format":"format","format_version":"2","gzip_level":"9","name":"test-s3","path":"/path","period":"12","redundancy":"reduced_redundancy","secret_key":"secret_key","timestamp_format":"%Y","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"615","placement":null,"response_condition":"","server_side_encryption_kms_key_id":null,"public_key":null,"updated_at":"2017-02-04T17:03:12+00:00","message_type":"classic","server_side_encryption":null,"deleted_at":null,"created_at":"2017-02-04T17:03:12+00:00"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -51,11 +53,11 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 29 Jun 2016 22:27:43 GMT
- Sat, 04 Feb 2017 17:03:13 GMT
Fastly-Ratelimit-Remaining:
- "895"
- "998"
Fastly-Ratelimit-Reset:
- "1467241200"
- "1486231200"
Status:
- 200 OK
Vary:
Expand All @@ -68,6 +70,6 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- app-slwdc9051-SL, cache-ord1728-ORD
- app-slwdc9051-SL, cache-iad2621-IAD
status: 200 OK
code: 200
14 changes: 7 additions & 7 deletions fixtures/s3s/delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ interactions:
form: {}
headers:
Fastly-Key:
- d631487398e146a8593ddd71d384c7e6
- 2d150df799bdabefa664a2182f85820a
User-Agent:
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.6.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/607/logging/s3/new-test-s3
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.8rc2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/615/logging/s3/new-test-s3
method: DELETE
response:
body: '{"status":"ok"}'
Expand All @@ -23,11 +23,11 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 29 Jun 2016 22:27:46 GMT
- Sat, 04 Feb 2017 17:03:14 GMT
Fastly-Ratelimit-Remaining:
- "882"
- "996"
Fastly-Ratelimit-Reset:
- "1467241200"
- "1486231200"
Status:
- 200 OK
Vary:
Expand All @@ -40,6 +40,6 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- app-slwdc9050-SL, cache-ord1730-ORD
- app-slwdc9050-SL, cache-iad2621-IAD
status: 200 OK
code: 200
12 changes: 6 additions & 6 deletions fixtures/s3s/get.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ interactions:
form: {}
headers:
Fastly-Key:
- d631487398e146a8593ddd71d384c7e6
- 2d150df799bdabefa664a2182f85820a
User-Agent:
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.6.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/607/logging/s3/test-s3
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.8rc2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/615/logging/s3/test-s3
method: GET
response:
body: '{"format_version":"1","response_condition":"","gzip_level":"9","server_side_encryption_kms_key_id":null,"secret_key":"secret_key","public_key":null,"updated_at":"2016-06-29T22:27:43+00:00","message_type":"classic","period":"12","name":"test-s3","server_side_encryption":null,"bucket_name":"bucket-name","timestamp_format":"%Y","service_id":"7i6HN3TK9wS159v2gPAZ8A","domain":"s3-website-us-west-2.amazonaws.com","redundancy":"reduced_redundancy","version":"607","path":"/path","deleted_at":null,"created_at":"2016-06-29T22:27:43+00:00","access_key":"access_key","format":"format"}'
body: '{"placement":null,"format_version":"2","response_condition":"","gzip_level":"9","server_side_encryption_kms_key_id":null,"secret_key":"secret_key","public_key":null,"updated_at":"2017-02-04T17:03:12+00:00","message_type":"classic","period":"12","name":"test-s3","server_side_encryption":null,"bucket_name":"bucket-name","timestamp_format":"%Y","service_id":"7i6HN3TK9wS159v2gPAZ8A","domain":"s3-website-us-west-2.amazonaws.com","redundancy":"reduced_redundancy","version":"615","path":"/path","deleted_at":null,"created_at":"2017-02-04T17:03:12+00:00","access_key":"access_key","format":"format"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -25,7 +25,7 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 29 Jun 2016 22:27:44 GMT
- Sat, 04 Feb 2017 17:03:13 GMT
Status:
- 200 OK
Vary:
Expand All @@ -38,6 +38,6 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- app-slwdc9051-SL, cache-ord1730-ORD
- app-slwdc9050-SL, cache-iad2621-IAD
status: 200 OK
code: 200
12 changes: 6 additions & 6 deletions fixtures/s3s/list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ interactions:
form: {}
headers:
Fastly-Key:
- d631487398e146a8593ddd71d384c7e6
- 2d150df799bdabefa664a2182f85820a
User-Agent:
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.6.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/607/logging/s3
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.8rc2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/615/logging/s3
method: GET
response:
body: '[{"format_version":"1","response_condition":"","gzip_level":"9","server_side_encryption_kms_key_id":null,"secret_key":"secret_key","public_key":null,"updated_at":"2016-06-29T22:27:43+00:00","message_type":"classic","period":"12","name":"test-s3","server_side_encryption":null,"bucket_name":"bucket-name","timestamp_format":"%Y","service_id":"7i6HN3TK9wS159v2gPAZ8A","domain":"s3-website-us-west-2.amazonaws.com","redundancy":"reduced_redundancy","version":"607","path":"/path","deleted_at":null,"created_at":"2016-06-29T22:27:43+00:00","access_key":"access_key","format":"format"}]'
body: '[{"placement":null,"format_version":"2","response_condition":"","gzip_level":"9","server_side_encryption_kms_key_id":null,"secret_key":"secret_key","public_key":null,"updated_at":"2017-02-04T17:03:12+00:00","message_type":"classic","period":"12","name":"test-s3","server_side_encryption":null,"bucket_name":"bucket-name","timestamp_format":"%Y","service_id":"7i6HN3TK9wS159v2gPAZ8A","domain":"s3-website-us-west-2.amazonaws.com","redundancy":"reduced_redundancy","version":"615","path":"/path","deleted_at":null,"created_at":"2017-02-04T17:03:12+00:00","access_key":"access_key","format":"format"}]'
headers:
Accept-Ranges:
- bytes
Expand All @@ -25,7 +25,7 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 29 Jun 2016 22:27:44 GMT
- Sat, 04 Feb 2017 17:03:13 GMT
Status:
- 200 OK
Vary:
Expand All @@ -38,6 +38,6 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- app-slwdc9051-SL, cache-ord1730-ORD
- app-slwdc9051-SL, cache-iad2621-IAD
status: 200 OK
code: 200
20 changes: 10 additions & 10 deletions fixtures/s3s/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
version: 1
interactions:
- request:
body: Name=test-s3&Service=7i6HN3TK9wS159v2gPAZ8A&Version=607&name=new-test-s3
body: Name=test-s3&Service=7i6HN3TK9wS159v2gPAZ8A&Version=615&name=new-test-s3
form:
Name:
- test-s3
Service:
- 7i6HN3TK9wS159v2gPAZ8A
Version:
- "607"
- "615"
name:
- new-test-s3
headers:
Content-Type:
- application/x-www-form-urlencoded
Fastly-Key:
- d631487398e146a8593ddd71d384c7e6
- 2d150df799bdabefa664a2182f85820a
User-Agent:
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.6.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/607/logging/s3/test-s3
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.8rc2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/615/logging/s3/test-s3
method: PUT
response:
body: '{"format_version":"1","response_condition":"","gzip_level":"9","server_side_encryption_kms_key_id":null,"secret_key":"secret_key","public_key":null,"updated_at":"2016-06-29T22:27:43+00:00","message_type":"classic","period":"12","name":"new-test-s3","server_side_encryption":null,"bucket_name":"bucket-name","timestamp_format":"%Y","service_id":"7i6HN3TK9wS159v2gPAZ8A","domain":"s3-website-us-west-2.amazonaws.com","redundancy":"reduced_redundancy","version":"607","path":"/path","deleted_at":null,"created_at":"2016-06-29T22:27:43+00:00","access_key":"access_key","format":"format"}'
body: '{"placement":null,"format_version":"2","response_condition":"","gzip_level":"9","server_side_encryption_kms_key_id":null,"secret_key":"secret_key","public_key":null,"updated_at":"2017-02-04T17:03:12+00:00","message_type":"classic","period":"12","name":"new-test-s3","server_side_encryption":null,"bucket_name":"bucket-name","timestamp_format":"%Y","service_id":"7i6HN3TK9wS159v2gPAZ8A","domain":"s3-website-us-west-2.amazonaws.com","redundancy":"reduced_redundancy","version":"615","path":"/path","deleted_at":null,"created_at":"2017-02-04T17:03:12+00:00","access_key":"access_key","format":"format"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -33,11 +33,11 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 29 Jun 2016 22:27:45 GMT
- Sat, 04 Feb 2017 17:03:13 GMT
Fastly-Ratelimit-Remaining:
- "884"
- "997"
Fastly-Ratelimit-Reset:
- "1467241200"
- "1486231200"
Status:
- 200 OK
Vary:
Expand All @@ -50,6 +50,6 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- app-slwdc9050-SL, cache-ord1730-ORD
- app-slwdc9050-SL, cache-iad2621-IAD
status: 200 OK
code: 200
14 changes: 7 additions & 7 deletions fixtures/s3s/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ interactions:
form: {}
headers:
Fastly-Key:
- d631487398e146a8593ddd71d384c7e6
- 2d150df799bdabefa664a2182f85820a
User-Agent:
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.6.2)
- FastlyGo/0.2 (+github.com/sethvargo/go-fastly; go1.8rc2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version
method: POST
response:
body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":607}'
body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":615}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -23,11 +23,11 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 29 Jun 2016 22:27:43 GMT
- Sat, 04 Feb 2017 17:03:12 GMT
Fastly-Ratelimit-Remaining:
- "900"
- "999"
Fastly-Ratelimit-Reset:
- "1467241200"
- "1486231200"
Status:
- 200 OK
Vary:
Expand All @@ -40,6 +40,6 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- app-slwdc9050-SL, cache-ord1748-ORD
- app-slwdc9051-SL, cache-iad2621-IAD
status: 200 OK
code: 200

0 comments on commit 6ae4cf1

Please sign in to comment.