Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(request_settings): make action a pointer in update #488

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions fastly/fixtures/request_settings/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.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/94/request_settings/test-request-setting
- FastlyGo/8.6.4 (+github.com/fastly/go-fastly; go1.19.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/4/request_settings/test-request-setting
method: DELETE
response:
body: '{"msg":"Record not found","detail":"Couldn''t find RequestSettings ''{
deleted =\u003e 0000-00-00 00:00:00, name =\u003e test-request-setting, service
=\u003e 7i6HN3TK9wS159v2gPAZ8A, version =\u003e 94 }''"}'
=\u003e 7i6HN3TK9wS159v2gPAZ8A, version =\u003e 4 }''"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -21,11 +21,13 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 07 Nov 2022 14:19:12 GMT
- Thu, 16 Nov 2023 15:53:57 GMT
Fastly-Ratelimit-Remaining:
- "9983"
- "9988"
Fastly-Ratelimit-Reset:
- "1667833200"
- "1700150400"
Pragma:
- no-cache
Status:
- 404 Not Found
Strict-Transport-Security:
Expand All @@ -39,9 +41,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-1-CONTROL-AWS, cache-man4131-MAN
- cache-control-cp-aws-us-east-2-prod-3-CONTROL-AWS-UE2, cache-lcy-eglc8600073-LCY
X-Timer:
- S1667830753.559013,VS0,VE143
- S1700150037.052450,VS0,VE160
status: 404 Not Found
code: 404
duration: ""
Expand All @@ -50,13 +52,13 @@ interactions:
form: {}
headers:
User-Agent:
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/94/request_settings/new-test-request-setting
- FastlyGo/8.6.4 (+github.com/fastly/go-fastly; go1.19.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/4/request_settings/new-test-request-setting
method: DELETE
response:
body: '{"msg":"Record not found","detail":"Couldn''t find RequestSettings ''{
deleted =\u003e 0000-00-00 00:00:00, name =\u003e new-test-request-setting,
service =\u003e 7i6HN3TK9wS159v2gPAZ8A, version =\u003e 94 }''"}'
service =\u003e 7i6HN3TK9wS159v2gPAZ8A, version =\u003e 4 }''"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -65,11 +67,13 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 07 Nov 2022 14:19:12 GMT
- Thu, 16 Nov 2023 15:53:58 GMT
Fastly-Ratelimit-Remaining:
- "9982"
- "9987"
Fastly-Ratelimit-Reset:
- "1667833200"
- "1700150400"
Pragma:
- no-cache
Status:
- 404 Not Found
Strict-Transport-Security:
Expand All @@ -83,9 +87,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-7-CONTROL-AWS, cache-man4131-MAN
- cache-control-canary-cp-aws-us-east-2-prod-2-CONTROL-AWS-UE2, cache-lcy-eglc8600073-LCY
X-Timer:
- S1667830753.727806,VS0,VE148
- S1700150038.967547,VS0,VE168
status: 404 Not Found
code: 404
duration: ""
18 changes: 10 additions & 8 deletions fastly/fixtures/request_settings/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ interactions:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/94/request_settings
- FastlyGo/8.6.4 (+github.com/fastly/go-fastly; go1.19.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/4/request_settings
method: POST
response:
body: '{"action":"lookup","bypass_busy_wait":"1","default_host":"example.com","force_miss":"1","force_ssl":"1","geo_headers":"1","hash_keys":"a,b,c","max_stale_age":"30","name":"test-request-setting","timer_support":"1","xff":"leave","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"94","updated_at":"2022-11-07T14:19:11Z","request_condition":"","deleted_at":null,"created_at":"2022-11-07T14:19:11Z"}'
body: '{"action":"lookup","bypass_busy_wait":"1","default_host":"example.com","force_miss":"1","force_ssl":"1","geo_headers":"1","hash_keys":"a,b,c","max_stale_age":"30","name":"test-request-setting","timer_support":"1","xff":"leave","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"4","deleted_at":null,"request_condition":"","updated_at":"2023-11-16T15:53:54Z","created_at":"2023-11-16T15:53:54Z"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -43,11 +43,13 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 07 Nov 2022 14:19:11 GMT
- Thu, 16 Nov 2023 15:53:55 GMT
Fastly-Ratelimit-Remaining:
- "9986"
- "9993"
Fastly-Ratelimit-Reset:
- "1667833200"
- "1700150400"
Pragma:
- no-cache
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -61,9 +63,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-7-CONTROL-AWS, cache-man4131-MAN
- cache-control-canary-cp-aws-us-east-2-prod-2-CONTROL-AWS-UE2, cache-lcy-eglc8600073-LCY
X-Timer:
- S1667830751.990997,VS0,VE361
- S1700150035.817898,VS0,VE276
status: 200 OK
code: 200
duration: ""
16 changes: 9 additions & 7 deletions fastly/fixtures/request_settings/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.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/94/request_settings/new-test-request-setting
- FastlyGo/8.6.4 (+github.com/fastly/go-fastly; go1.19.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/4/request_settings/new-test-request-setting
method: DELETE
response:
body: '{"status":"ok"}'
Expand All @@ -19,11 +19,13 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 07 Nov 2022 14:19:12 GMT
- Thu, 16 Nov 2023 15:53:57 GMT
Fastly-Ratelimit-Remaining:
- "9984"
- "9989"
Fastly-Ratelimit-Reset:
- "1667833200"
- "1700150400"
Pragma:
- no-cache
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -37,9 +39,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-2-CONTROL-AWS, cache-man4131-MAN
- cache-control-cp-aws-us-east-2-prod-4-CONTROL-AWS-UE2, cache-lcy-eglc8600073-LCY
X-Timer:
- S1667830752.150023,VS0,VE382
- S1700150037.732570,VS0,VE289
status: 200 OK
code: 200
duration: ""
14 changes: 8 additions & 6 deletions fastly/fixtures/request_settings/get.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ interactions:
form: {}
headers:
User-Agent:
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/94/request_settings/test-request-setting
- FastlyGo/8.6.4 (+github.com/fastly/go-fastly; go1.19.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/4/request_settings/test-request-setting
method: GET
response:
body: '{"force_miss":"1","service_id":"7i6HN3TK9wS159v2gPAZ8A","max_stale_age":"30","name":"test-request-setting","hash_keys":"a,b,c","action":"lookup","bypass_busy_wait":"1","created_at":"2022-11-07T14:19:11Z","force_ssl":"1","request_condition":"","geo_headers":"1","timer_support":"1","xff":"leave","default_host":"example.com","updated_at":"2022-11-07T14:19:11Z","version":"94","deleted_at":null}'
body: '{"geo_headers":"1","request_condition":"","default_host":"example.com","name":"test-request-setting","force_miss":"1","version":"4","max_stale_age":"30","deleted_at":null,"xff":"leave","bypass_busy_wait":"1","updated_at":"2023-11-16T15:53:54Z","service_id":"7i6HN3TK9wS159v2gPAZ8A","created_at":"2023-11-16T15:53:54Z","hash_keys":"a,b,c","force_ssl":"1","timer_support":"1","action":"lookup"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -19,7 +19,9 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 07 Nov 2022 14:19:11 GMT
- Thu, 16 Nov 2023 15:53:55 GMT
Pragma:
- no-cache
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -33,9 +35,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4131-MAN
- cache-control-canary-cp-aws-us-east-2-prod-2-CONTROL-AWS-UE2, cache-lcy-eglc8600073-LCY
X-Timer:
- S1667830752.573047,VS0,VE306
- S1700150035.304533,VS0,VE179
status: 200 OK
code: 200
duration: ""
14 changes: 8 additions & 6 deletions fastly/fixtures/request_settings/list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ interactions:
form: {}
headers:
User-Agent:
- FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/94/request_settings
- FastlyGo/8.6.4 (+github.com/fastly/go-fastly; go1.19.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/4/request_settings
method: GET
response:
body: '[{"default_host":"example.com","xff":"leave","created_at":"2022-11-07T14:19:11Z","deleted_at":null,"timer_support":"1","geo_headers":"1","name":"test-request-setting","bypass_busy_wait":"1","version":"94","max_stale_age":"30","action":"lookup","force_miss":"1","hash_keys":"a,b,c","updated_at":"2022-11-07T14:19:11Z","service_id":"7i6HN3TK9wS159v2gPAZ8A","request_condition":"","force_ssl":"1"}]'
body: '[{"name":"test-request-setting","bypass_busy_wait":"1","action":"lookup","request_condition":"","default_host":"example.com","hash_keys":"a,b,c","xff":"leave","created_at":"2023-11-16T15:53:54Z","force_miss":"1","max_stale_age":"30","service_id":"7i6HN3TK9wS159v2gPAZ8A","force_ssl":"1","geo_headers":"1","version":"4","updated_at":"2023-11-16T15:53:54Z","timer_support":"1","deleted_at":null}]'
headers:
Accept-Ranges:
- bytes
Expand All @@ -19,7 +19,9 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 07 Nov 2022 14:19:11 GMT
- Thu, 16 Nov 2023 15:53:55 GMT
Pragma:
- no-cache
Status:
- 200 OK
Strict-Transport-Security:
Expand All @@ -33,9 +35,9 @@ interactions:
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-1-prod-7-CONTROL-AWS, cache-man4131-MAN
- cache-control-cp-aws-us-east-2-prod-4-CONTROL-AWS-UE2, cache-lcy-eglc8600073-LCY
X-Timer:
- S1667830751.398590,VS0,VE143
- S1700150035.118860,VS0,VE160
status: 200 OK
code: 200
duration: ""
51 changes: 51 additions & 0 deletions fastly/fixtures/request_settings/update-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
version: 1
interactions:
- request:
body: action=
form:
action:
- ""
headers:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/8.6.4 (+github.com/fastly/go-fastly; go1.19.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/4/request_settings/new-test-request-setting
method: PUT
response:
body: '{"action":"","geo_headers":"1","version":"4","request_condition":"","deleted_at":null,"xff":"leave","created_at":"2023-11-16T15:53:54Z","timer_support":"1","service_id":"7i6HN3TK9wS159v2gPAZ8A","updated_at":"2023-11-16T15:53:55Z","max_stale_age":"30","bypass_busy_wait":"1","force_ssl":"1","name":"new-test-request-setting","hash_keys":"a,b,c","default_host":"example.com","force_miss":"1"}'
headers:
Accept-Ranges:
- bytes
Cache-Control:
- no-store
Content-Type:
- application/json
Date:
- Thu, 16 Nov 2023 15:53:56 GMT
Fastly-Ratelimit-Remaining:
- "9991"
Fastly-Ratelimit-Reset:
- "1700150400"
Pragma:
- no-cache
Status:
- 200 OK
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
Via:
- 1.1 varnish, 1.1 varnish
X-Cache:
- MISS, MISS
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-2-prod-2-CONTROL-AWS-UE2, cache-lcy-eglc8600073-LCY
X-Timer:
- S1700150036.835370,VS0,VE526
status: 200 OK
code: 200
duration: ""
51 changes: 51 additions & 0 deletions fastly/fixtures/request_settings/update-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
version: 1
interactions:
- request:
body: action=
form:
action:
- ""
headers:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/8.6.4 (+github.com/fastly/go-fastly; go1.19.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/4/request_settings/new-test-request-setting
method: PUT
response:
body: '{"force_ssl":"1","service_id":"7i6HN3TK9wS159v2gPAZ8A","created_at":"2023-11-16T15:53:54Z","hash_keys":"a,b,c","updated_at":"2023-11-16T15:53:56Z","bypass_busy_wait":"1","action":"","timer_support":"1","force_miss":"1","default_host":"example.com","name":"new-test-request-setting","request_condition":"","geo_headers":"1","xff":"leave","deleted_at":null,"max_stale_age":"30","version":"4"}'
headers:
Accept-Ranges:
- bytes
Cache-Control:
- no-store
Content-Type:
- application/json
Date:
- Thu, 16 Nov 2023 15:53:56 GMT
Fastly-Ratelimit-Remaining:
- "9990"
Fastly-Ratelimit-Reset:
- "1700150400"
Pragma:
- no-cache
Status:
- 200 OK
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
Via:
- 1.1 varnish, 1.1 varnish
X-Cache:
- MISS, MISS
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-cp-aws-us-east-2-prod-2-CONTROL-AWS-UE2, cache-lcy-eglc8600073-LCY
X-Timer:
- S1700150036.391435,VS0,VE305
status: 200 OK
code: 200
duration: ""
Loading
Loading