Skip to content

Commit

Permalink
Health checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Integralist committed Nov 7, 2022
1 parent 3328ee1 commit 0d1a61f
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 159 deletions.
32 changes: 16 additions & 16 deletions fastly/fixtures/health_checks/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ interactions:
form: {}
headers:
User-Agent:
- FastlyGo/6.7.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/131/healthcheck/test-healthcheck
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/80/healthcheck/test-healthcheck
method: DELETE
response:
body: '{"msg":"Record not found","detail":"Couldn''t find Healthcheck ''{ deleted
=\u003e 0000-00-00 00:00:00, name =\u003e test-healthcheck, service =\u003e
7i6HN3TK9wS159v2gPAZ8A, version =\u003e 131 }''"}'
7i6HN3TK9wS159v2gPAZ8A, version =\u003e 80 }''"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -21,11 +21,11 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 10 Oct 2022 11:57:58 GMT
- Mon, 07 Nov 2022 11:07:41 GMT
Fastly-Ratelimit-Remaining:
- "9917"
- "9981"
Fastly-Ratelimit-Reset:
- "1665403200"
- "1667822400"
Status:
- 404 Not Found
Strict-Transport-Security:
Expand All @@ -39,9 +39,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-2-CONTROL-AWS, cache-man4129-MAN
- cache-control-cp-aws-us-east-1-prod-2-CONTROL-AWS, cache-man4133-MAN
X-Timer:
- S1665403078.282367,VS0,VE141
- S1667819261.384411,VS0,VE137
status: 404 Not Found
code: 404
duration: ""
Expand All @@ -50,13 +50,13 @@ interactions:
form: {}
headers:
User-Agent:
- FastlyGo/6.7.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/131/healthcheck/new-test-healthcheck
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/80/healthcheck/new-test-healthcheck
method: DELETE
response:
body: '{"msg":"Record not found","detail":"Couldn''t find Healthcheck ''{ deleted
=\u003e 0000-00-00 00:00:00, name =\u003e new-test-healthcheck, service =\u003e
7i6HN3TK9wS159v2gPAZ8A, version =\u003e 131 }''"}'
7i6HN3TK9wS159v2gPAZ8A, version =\u003e 80 }''"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -65,11 +65,11 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 10 Oct 2022 11:57:58 GMT
- Mon, 07 Nov 2022 11:07:41 GMT
Fastly-Ratelimit-Remaining:
- "9916"
- "9980"
Fastly-Ratelimit-Reset:
- "1665403200"
- "1667822400"
Status:
- 404 Not Found
Strict-Transport-Security:
Expand All @@ -83,9 +83,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-6-CONTROL-AWS, cache-man4129-MAN
- cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4133-MAN
X-Timer:
- S1665403078.461078,VS0,VE309
- S1667819262.545833,VS0,VE134
status: 404 Not Found
code: 404
duration: ""
22 changes: 9 additions & 13 deletions fastly/fixtures/health_checks/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
version: 1
interactions:
- request:
body: ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=131&check_interval=2500&expected_response=200&host=example.com&http_version=1.1&initial=10&method=HEAD&name=test-healthcheck&path=%2Ffoo&threshold=10&timeout=1500&window=5000&headers=%5B"Foo:Bar","Baz:Qux"%5D
body: check_interval=2500&expected_response=200&host=example.com&http_version=1.1&initial=10&method=HEAD&name=test-healthcheck&path=%2Ffoo&threshold=10&timeout=1500&window=5000&headers=%5B"Foo:Bar","Baz:Qux"%5D
form:
ServiceID:
- 7i6HN3TK9wS159v2gPAZ8A
ServiceVersion:
- "131"
check_interval:
- "2500"
expected_response:
Expand Down Expand Up @@ -36,12 +32,12 @@ interactions:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/6.7.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/131/healthcheck
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/80/healthcheck
method: POST
response:
body: '{"check_interval":2500,"expected_response":200,"host":"example.com","http_version":"1.1","initial":10,"method":"HEAD","name":"test-healthcheck","path":"/foo","threshold":10,"timeout":1500,"window":5000,"headers":["Baz:
Qux","Foo: Bar"],"service_id":"7i6HN3TK9wS159v2gPAZ8A","version":131,"deleted_at":null,"updated_at":"2022-10-10T11:57:57Z","created_at":"2022-10-10T11:57:57Z","comment":""}'
Qux","Foo: Bar"],"service_id":"7i6HN3TK9wS159v2gPAZ8A","version":80,"comment":"","deleted_at":null,"updated_at":"2022-11-07T11:07:40Z","created_at":"2022-11-07T11:07:40Z"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -50,11 +46,11 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 10 Oct 2022 11:57:57 GMT
- Mon, 07 Nov 2022 11:07:40 GMT
Fastly-Ratelimit-Remaining:
- "9920"
- "9984"
Fastly-Ratelimit-Reset:
- "1665403200"
- "1667822400"
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -68,9 +64,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-2-CONTROL-AWS, cache-man4129-MAN
- cache-control-cp-aws-us-east-1-prod-1-CONTROL-AWS, cache-man4133-MAN
X-Timer:
- S1665403077.753161,VS0,VE358
- S1667819260.364022,VS0,VE182
status: 200 OK
code: 200
duration: ""
14 changes: 7 additions & 7 deletions fastly/fixtures/health_checks/delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ interactions:
form: {}
headers:
User-Agent:
- FastlyGo/6.7.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/131/healthcheck/new-test-healthcheck
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/80/healthcheck/new-test-healthcheck
method: DELETE
response:
body: '{"status":"ok"}'
Expand All @@ -19,11 +19,11 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 10 Oct 2022 11:57:58 GMT
- Mon, 07 Nov 2022 11:07:41 GMT
Fastly-Ratelimit-Remaining:
- "9918"
- "9982"
Fastly-Ratelimit-Reset:
- "1665403200"
- "1667822400"
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -37,9 +37,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-1-CONTROL-AWS, cache-man4129-MAN
- cache-control-cp-aws-us-east-1-prod-1-CONTROL-AWS, cache-man4133-MAN
X-Timer:
- S1665403078.883343,VS0,VE375
- S1667819261.160660,VS0,VE196
status: 200 OK
code: 200
duration: ""
14 changes: 7 additions & 7 deletions fastly/fixtures/health_checks/get.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ interactions:
form: {}
headers:
User-Agent:
- FastlyGo/6.7.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/131/healthcheck/test-healthcheck
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/80/healthcheck/test-healthcheck
method: GET
response:
body: '{"threshold":10,"created_at":"2022-10-10T11:57:57Z","headers":["Baz: Qux","Foo:
Bar"],"deleted_at":null,"window":5000,"timeout":1500,"initial":10,"expected_response":200,"comment":"","method":"HEAD","host":"example.com","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":131,"path":"/foo","http_version":"1.1","name":"test-healthcheck","updated_at":"2022-10-10T11:57:57Z","check_interval":2500}'
body: '{"window":5000,"name":"test-healthcheck","version":80,"initial":10,"service_id":"7i6HN3TK9wS159v2gPAZ8A","updated_at":"2022-11-07T11:07:40Z","expected_response":200,"deleted_at":null,"path":"/foo","method":"HEAD","comment":"","host":"example.com","threshold":10,"timeout":1500,"headers":["Baz:
Qux","Foo: Bar"],"check_interval":2500,"created_at":"2022-11-07T11:07:40Z","http_version":"1.1"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -20,7 +20,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 10 Oct 2022 11:57:57 GMT
- Mon, 07 Nov 2022 11:07:40 GMT
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -34,9 +34,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-6-CONTROL-AWS, cache-man4129-MAN
- cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4133-MAN
X-Timer:
- S1665403077.486537,VS0,VE137
- S1667819261.734998,VS0,VE138
status: 200 OK
code: 200
duration: ""
13 changes: 6 additions & 7 deletions fastly/fixtures/health_checks/list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ interactions:
form: {}
headers:
User-Agent:
- FastlyGo/6.7.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/131/healthcheck
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/80/healthcheck
method: GET
response:
body: '[{"http_version":"1.1","check_interval":2500,"initial":10,"name":"test-healthcheck","path":"/foo","headers":["Baz:
Qux","Foo: Bar"],"window":5000,"comment":"","threshold":10,"deleted_at":null,"version":131,"updated_at":"2022-10-10T11:57:57Z","method":"HEAD","created_at":"2022-10-10T11:57:57Z","host":"example.com","timeout":1500,"expected_response":200,"service_id":"7i6HN3TK9wS159v2gPAZ8A"}]'
body: '[{"headers":["Baz: Qux","Foo: Bar"],"expected_response":200,"host":"example.com","http_version":"1.1","name":"test-healthcheck","method":"HEAD","service_id":"7i6HN3TK9wS159v2gPAZ8A","threshold":10,"timeout":1500,"created_at":"2022-11-07T11:07:40Z","comment":"","path":"/foo","version":80,"deleted_at":null,"check_interval":2500,"window":5000,"initial":10,"updated_at":"2022-11-07T11:07:40Z"}]'
headers:
Accept-Ranges:
- bytes
Expand All @@ -20,7 +19,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 10 Oct 2022 11:57:57 GMT
- Mon, 07 Nov 2022 11:07:40 GMT
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -34,9 +33,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4129-MAN
- cache-control-cp-aws-us-east-1-prod-6-CONTROL-AWS, cache-man4133-MAN
X-Timer:
- S1665403077.147678,VS0,VE314
- S1667819261.574273,VS0,VE131
status: 200 OK
code: 200
duration: ""
24 changes: 9 additions & 15 deletions fastly/fixtures/health_checks/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
version: 1
interactions:
- request:
body: Name=test-healthcheck&ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=131&name=new-test-healthcheck&headers=%5B"Beep:Boop"%5D
body: name=new-test-healthcheck&headers=%5B"Beep:Boop"%5D
form:
Name:
- test-healthcheck
ServiceID:
- 7i6HN3TK9wS159v2gPAZ8A
ServiceVersion:
- "131"
headers:
- '["Beep:Boop"]'
name:
Expand All @@ -18,11 +12,11 @@ interactions:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/6.7.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/131/healthcheck/test-healthcheck
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/80/healthcheck/test-healthcheck
method: PUT
response:
body: '{"expected_response":200,"http_version":"1.1","version":131,"method":"HEAD","updated_at":"2022-10-10T11:57:57Z","comment":"","timeout":1500,"host":"example.com","name":"new-test-healthcheck","created_at":"2022-10-10T11:57:57Z","headers":["Beep:Boop"],"check_interval":2500,"path":"/foo","deleted_at":null,"threshold":10,"initial":10,"window":5000,"service_id":"7i6HN3TK9wS159v2gPAZ8A"}'
body: '{"host":"example.com","deleted_at":null,"expected_response":200,"path":"/foo","http_version":"1.1","initial":10,"created_at":"2022-11-07T11:07:40Z","comment":"","timeout":1500,"service_id":"7i6HN3TK9wS159v2gPAZ8A","updated_at":"2022-11-07T11:07:40Z","name":"new-test-healthcheck","check_interval":2500,"threshold":10,"headers":["Beep:Boop"],"version":80,"window":5000,"method":"HEAD"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -31,11 +25,11 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 10 Oct 2022 11:57:57 GMT
- Mon, 07 Nov 2022 11:07:41 GMT
Fastly-Ratelimit-Remaining:
- "9919"
- "9983"
Fastly-Ratelimit-Reset:
- "1665403200"
- "1667822400"
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -49,9 +43,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-2-CONTROL-AWS, cache-man4129-MAN
- cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4133-MAN
X-Timer:
- S1665403078.651554,VS0,VE205
- S1667819261.910817,VS0,VE221
status: 200 OK
code: 200
duration: ""
20 changes: 9 additions & 11 deletions fastly/fixtures/health_checks/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
version: 1
interactions:
- request:
body: ServiceID=7i6HN3TK9wS159v2gPAZ8A
form:
ServiceID:
- 7i6HN3TK9wS159v2gPAZ8A
body: ""
form: {}
headers:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/6.7.0 (+github.com/fastly/go-fastly; go1.16.15)
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version
method: POST
response:
body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":131}'
body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":80}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -23,11 +21,11 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 10 Oct 2022 11:57:56 GMT
- Mon, 07 Nov 2022 11:07:40 GMT
Fastly-Ratelimit-Remaining:
- "9921"
- "9985"
Fastly-Ratelimit-Reset:
- "1665403200"
- "1667822400"
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -41,9 +39,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-1-CONTROL-AWS, cache-man4129-MAN
- cache-control-cp-aws-us-east-1-prod-1-CONTROL-AWS, cache-man4133-MAN
X-Timer:
- S1665403076.346639,VS0,VE373
- S1667819260.122698,VS0,VE212
status: 200 OK
code: 200
duration: ""
Loading

0 comments on commit 0d1a61f

Please sign in to comment.