From 0b4ba41a23fe9a9e51cd3a103409b9ec1862fdb2 Mon Sep 17 00:00:00 2001 From: Integralist Date: Thu, 3 Nov 2022 17:06:21 +0000 Subject: [PATCH] ACLs --- fastly/acl.go | 34 +++------ fastly/acl_test.go | 75 ++++++++++--------- fastly/fastly_test.go | 2 +- fastly/fixtures/acls/cleanup.yaml | 32 ++++---- fastly/fixtures/acls/create.yaml | 20 ++--- .../fixtures/acls/create_expected_error.yaml | 52 +++++++++++++ fastly/fixtures/acls/delete.yaml | 14 ++-- fastly/fixtures/acls/get.yaml | 12 +-- fastly/fixtures/acls/list.yaml | 12 +-- fastly/fixtures/acls/update.yaml | 20 ++--- fastly/fixtures/acls/version.yaml | 14 ++-- 11 files changed, 166 insertions(+), 121 deletions(-) create mode 100644 fastly/fixtures/acls/create_expected_error.yaml diff --git a/fastly/acl.go b/fastly/acl.go index 3b09627da..c8c0a065d 100644 --- a/fastly/acl.go +++ b/fastly/acl.go @@ -49,7 +49,6 @@ func (c *Client) ListACLs(i *ListACLsInput) ([]*ACL, error) { if i.ServiceID == "" { return nil, ErrMissingServiceID } - if i.ServiceVersion == 0 { return nil, ErrMissingServiceVersion } @@ -72,7 +71,7 @@ func (c *Client) ListACLs(i *ListACLsInput) ([]*ACL, error) { // CreateACLInput is used as input to the CreateACL function. type CreateACLInput struct { // Name is the name of the ACL to create (required) - Name string `url:"name"` + Name *string `url:"name,omitempty"` // ServiceID is the ID of the service (required). ServiceID string // ServiceVersion is the specific configuration version (required). @@ -84,7 +83,6 @@ func (c *Client) CreateACL(i *CreateACLInput) (*ACL, error) { if i.ServiceID == "" { return nil, ErrMissingServiceID } - if i.ServiceVersion == 0 { return nil, ErrMissingServiceVersion } @@ -115,18 +113,16 @@ type DeleteACLInput struct { // DeleteACL deletes the specified resource. func (c *Client) DeleteACL(i *DeleteACLInput) error { + if i.Name == "" { + return ErrMissingName + } if i.ServiceID == "" { return ErrMissingServiceID } - if i.ServiceVersion == 0 { return ErrMissingServiceVersion } - if i.Name == "" { - return ErrMissingName - } - path := fmt.Sprintf("/service/%s/version/%d/acl/%s", i.ServiceID, i.ServiceVersion, url.PathEscape(i.Name)) resp, err := c.Delete(path, nil) if err != nil { @@ -156,18 +152,16 @@ type GetACLInput struct { // GetACL retrieves the specified resource. func (c *Client) GetACL(i *GetACLInput) (*ACL, error) { + if i.Name == "" { + return nil, ErrMissingName + } if i.ServiceID == "" { return nil, ErrMissingServiceID } - if i.ServiceVersion == 0 { return nil, ErrMissingServiceVersion } - if i.Name == "" { - return nil, ErrMissingName - } - path := fmt.Sprintf("/service/%s/version/%d/acl/%s", i.ServiceID, i.ServiceVersion, url.PathEscape(i.Name)) resp, err := c.Get(path, nil) if err != nil { @@ -187,7 +181,7 @@ type UpdateACLInput struct { // Name is the name of the ACL to update (required). Name string // NewName is the new name of the ACL to update (required). - NewName string `url:"name"` + NewName *string `url:"name,omitempty"` // ServiceID is the ID of the service (required). ServiceID string // ServiceVersion is the specific configuration version (required). @@ -196,22 +190,16 @@ type UpdateACLInput struct { // UpdateACL updates the specified resource. func (c *Client) UpdateACL(i *UpdateACLInput) (*ACL, error) { + if i.Name == "" { + return nil, ErrMissingName + } if i.ServiceID == "" { return nil, ErrMissingServiceID } - if i.ServiceVersion == 0 { return nil, ErrMissingServiceVersion } - if i.Name == "" { - return nil, ErrMissingName - } - - if i.NewName == "" { - return nil, ErrMissingNewName - } - path := fmt.Sprintf("/service/%s/version/%d/acl/%s", i.ServiceID, i.ServiceVersion, url.PathEscape(i.Name)) resp, err := c.PutForm(path, i, nil) if err != nil { diff --git a/fastly/acl_test.go b/fastly/acl_test.go index d013b3937..ac742f1cb 100644 --- a/fastly/acl_test.go +++ b/fastly/acl_test.go @@ -18,13 +18,25 @@ func TestClient_ACLs(t *testing.T) { a, err = c.CreateACL(&CreateACLInput{ ServiceID: testServiceID, ServiceVersion: testVersion.Number, - Name: "test_acl", + Name: String("test_acl"), }) }) if err != nil { t.Fatal(err) } + // Create with expected error + var errExpected error + record(t, fixtureBase+"create_expected_error", func(c *Client) { + _, errExpected = c.CreateACL(&CreateACLInput{ + ServiceID: testServiceID, + ServiceVersion: testVersion.Number, + }) + }) + if errExpected == nil { + t.Error("expected API error, got nil") + } + // Ensure deleted defer func() { record(t, fixtureBase+"cleanup", func(c *Client) { @@ -84,7 +96,7 @@ func TestClient_ACLs(t *testing.T) { ServiceID: testServiceID, ServiceVersion: testVersion.Number, Name: "test_acl", - NewName: "new_test_acl", + NewName: String("new_test_acl"), }) }) if err != nil { @@ -150,89 +162,82 @@ func TestClient_CreateACL_validation(t *testing.T) { func TestClient_GetACL_validation(t *testing.T) { var err error _, err = testClient.GetACL(&GetACLInput{ - ServiceID: "", + ServiceID: "foo", + ServiceVersion: 1, }) - if err != ErrMissingServiceID { + if err != ErrMissingName { t.Errorf("bad error: %s", err) } _, err = testClient.GetACL(&GetACLInput{ - ServiceID: "foo", - ServiceVersion: 0, + Name: "test", + ServiceVersion: 1, }) - if err != ErrMissingServiceVersion { + if err != ErrMissingServiceID { t.Errorf("bad error: %s", err) } _, err = testClient.GetACL(&GetACLInput{ - ServiceID: "foo", - ServiceVersion: 1, - Name: "", + Name: "test", + ServiceID: "foo", }) - if err != ErrMissingName { + if err != ErrMissingServiceVersion { t.Errorf("bad error: %s", err) } } func TestClient_UpdateACL_validation(t *testing.T) { var err error - _, err = testClient.UpdateACL(&UpdateACLInput{ - ServiceID: "", - }) - if err != ErrMissingServiceID { - t.Errorf("bad error: %s", err) - } _, err = testClient.UpdateACL(&UpdateACLInput{ ServiceID: "foo", - ServiceVersion: 0, + ServiceVersion: 1, }) - if err != ErrMissingServiceVersion { + if err != ErrMissingName { t.Errorf("bad error: %s", err) } _, err = testClient.UpdateACL(&UpdateACLInput{ - ServiceID: "foo", + Name: "test", ServiceVersion: 1, - Name: "", }) - if err != ErrMissingName { + if err != ErrMissingServiceID { t.Errorf("bad error: %s", err) } + _, err = testClient.UpdateACL(&UpdateACLInput{ - ServiceID: "foo", - ServiceVersion: 1, - Name: "acl", - NewName: "", + Name: "test", + ServiceID: "foo", }) - if err != ErrMissingNewName { + if err != ErrMissingServiceVersion { t.Errorf("bad error: %s", err) } } func TestClient_DeleteACL_validation(t *testing.T) { var err error + err = testClient.DeleteACL(&DeleteACLInput{ - ServiceID: "", + ServiceID: "foo", + ServiceVersion: 1, }) - if err != ErrMissingServiceID { + if err != ErrMissingName { t.Errorf("bad error: %s", err) } err = testClient.DeleteACL(&DeleteACLInput{ - ServiceID: "foo", + Name: "test", ServiceVersion: 0, }) - if err != ErrMissingServiceVersion { + if err != ErrMissingServiceID { t.Errorf("bad error: %s", err) } err = testClient.DeleteACL(&DeleteACLInput{ - ServiceID: "foo", - ServiceVersion: 1, - Name: "", + Name: "test", + ServiceID: "foo", }) - if err != ErrMissingName { + if err != ErrMissingServiceVersion { t.Errorf("bad error: %s", err) } } diff --git a/fastly/fastly_test.go b/fastly/fastly_test.go index 060b12528..93a27da84 100644 --- a/fastly/fastly_test.go +++ b/fastly/fastly_test.go @@ -228,7 +228,7 @@ func createTestACL(t *testing.T, createFixture string, serviceID string, version acl, err = client.CreateACL(&CreateACLInput{ ServiceID: serviceID, ServiceVersion: version, - Name: fmt.Sprintf("test_acl_%s", aclNameSuffix), + Name: String(fmt.Sprintf("test_acl_%s", aclNameSuffix)), }) }) if err != nil { diff --git a/fastly/fixtures/acls/cleanup.yaml b/fastly/fixtures/acls/cleanup.yaml index efc165c7a..5b0cce591 100644 --- a/fastly/fixtures/acls/cleanup.yaml +++ b/fastly/fixtures/acls/cleanup.yaml @@ -6,13 +6,13 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/5.1.1 (+github.com/fastly/go-fastly; go1.17) - url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/41/acl/test_acl + - FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15) + url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/24/acl/test_acl method: DELETE response: body: '{"msg":"Record not found","detail":"Couldn''t find ACL ''{ deleted =\u003e 0000-00-00 00:00:00, name =\u003e test_acl, service =\u003e 7i6HN3TK9wS159v2gPAZ8A, - version =\u003e 41 }''"}' + version =\u003e 24 }''"}' headers: Accept-Ranges: - bytes @@ -21,11 +21,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 03 Nov 2021 14:27:07 GMT + - Thu, 03 Nov 2022 17:11:12 GMT Fastly-Ratelimit-Remaining: - - "4995" + - "9988" Fastly-Ratelimit-Reset: - - "1635951600" + - "1667498400" Status: - 404 Not Found Strict-Transport-Security: @@ -39,9 +39,9 @@ interactions: X-Cache-Hits: - 0, 0 X-Served-By: - - cache-control-slwdc9037-CONTROL-SLWDC, cache-man4137-MAN + - cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4143-MAN X-Timer: - - S1635949627.124914,VS0,VE143 + - S1667495472.160631,VS0,VE304 status: 404 Not Found code: 404 duration: "" @@ -50,13 +50,13 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/5.1.1 (+github.com/fastly/go-fastly; go1.17) - url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/41/acl/new_test_acl + - FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15) + url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/24/acl/new_test_acl method: DELETE response: body: '{"msg":"Record not found","detail":"Couldn''t find ACL ''{ deleted =\u003e 0000-00-00 00:00:00, name =\u003e new_test_acl, service =\u003e 7i6HN3TK9wS159v2gPAZ8A, - version =\u003e 41 }''"}' + version =\u003e 24 }''"}' headers: Accept-Ranges: - bytes @@ -65,11 +65,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 03 Nov 2021 14:27:07 GMT + - Thu, 03 Nov 2022 17:11:12 GMT Fastly-Ratelimit-Remaining: - - "4994" + - "9987" Fastly-Ratelimit-Reset: - - "1635951600" + - "1667498400" Status: - 404 Not Found Strict-Transport-Security: @@ -83,9 +83,9 @@ interactions: X-Cache-Hits: - 0, 0 X-Served-By: - - cache-control-slwdc9037-CONTROL-SLWDC, cache-man4137-MAN + - cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4143-MAN X-Timer: - - S1635949627.303422,VS0,VE124 + - S1667495472.491100,VS0,VE144 status: 404 Not Found code: 404 duration: "" diff --git a/fastly/fixtures/acls/create.yaml b/fastly/fixtures/acls/create.yaml index 707692e35..3e4ff2b57 100644 --- a/fastly/fixtures/acls/create.yaml +++ b/fastly/fixtures/acls/create.yaml @@ -2,23 +2,23 @@ version: 1 interactions: - request: - body: ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=41&name=test_acl + body: ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=24&name=test_acl form: ServiceID: - 7i6HN3TK9wS159v2gPAZ8A ServiceVersion: - - "41" + - "24" name: - test_acl headers: Content-Type: - application/x-www-form-urlencoded User-Agent: - - FastlyGo/5.1.1 (+github.com/fastly/go-fastly; go1.17) - url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/41/acl + - FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15) + url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/24/acl method: POST response: - body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"41","name":"test_acl","created_at":"2021-11-03T14:27:05Z","deleted_at":null,"id":"66T8Pl5oaiXfTuRJwYv7G7","updated_at":"2021-11-03T14:27:05Z"}' + body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"24","name":"test_acl","updated_at":"2022-11-03T17:11:10Z","deleted_at":null,"created_at":"2022-11-03T17:11:10Z","id":"9EcKIe9YsavIli7ueC0Pl5"}' headers: Accept-Ranges: - bytes @@ -27,11 +27,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 03 Nov 2021 14:27:05 GMT + - Thu, 03 Nov 2022 17:11:10 GMT Fastly-Ratelimit-Remaining: - - "4998" + - "9992" Fastly-Ratelimit-Reset: - - "1635951600" + - "1667498400" Status: - 200 OK Strict-Transport-Security: @@ -45,9 +45,9 @@ interactions: X-Cache-Hits: - 0, 0 X-Served-By: - - cache-control-slwdc9036-CONTROL-SLWDC, cache-man4137-MAN + - cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4143-MAN X-Timer: - - S1635949625.055148,VS0,VE203 + - S1667495470.086205,VS0,VE188 status: 200 OK code: 200 duration: "" diff --git a/fastly/fixtures/acls/create_expected_error.yaml b/fastly/fixtures/acls/create_expected_error.yaml new file mode 100644 index 000000000..28fe750a5 --- /dev/null +++ b/fastly/fixtures/acls/create_expected_error.yaml @@ -0,0 +1,52 @@ +--- +version: 1 +interactions: +- request: + body: ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=24 + form: + ServiceID: + - 7i6HN3TK9wS159v2gPAZ8A + ServiceVersion: + - "24" + headers: + 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/24/acl + method: POST + response: + body: '{"msg":"Bad request","detail":"Name must start with alphabetical and contain + only alphanumeric, underscore, and whitespace"}' + headers: + Accept-Ranges: + - bytes + Cache-Control: + - no-store + Content-Type: + - application/json + Date: + - Thu, 03 Nov 2022 17:11:10 GMT + Fastly-Ratelimit-Remaining: + - "9991" + Fastly-Ratelimit-Reset: + - "1667498400" + Status: + - 400 Bad Request + 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-1-prod-7-CONTROL-AWS, cache-man4143-MAN + X-Timer: + - S1667495470.306442,VS0,VE315 + status: 400 Bad Request + code: 400 + duration: "" diff --git a/fastly/fixtures/acls/delete.yaml b/fastly/fixtures/acls/delete.yaml index 2eaca28f3..43a961cf9 100644 --- a/fastly/fixtures/acls/delete.yaml +++ b/fastly/fixtures/acls/delete.yaml @@ -6,8 +6,8 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/5.1.1 (+github.com/fastly/go-fastly; go1.17) - url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/41/acl/new_test_acl + - FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15) + url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/24/acl/new_test_acl method: DELETE response: body: '{"status":"ok"}' @@ -19,11 +19,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 03 Nov 2021 14:27:07 GMT + - Thu, 03 Nov 2022 17:11:12 GMT Fastly-Ratelimit-Remaining: - - "4996" + - "9989" Fastly-Ratelimit-Reset: - - "1635951600" + - "1667498400" Status: - 200 OK Strict-Transport-Security: @@ -37,9 +37,9 @@ interactions: X-Cache-Hits: - 0, 0 X-Served-By: - - cache-control-slwdc9037-CONTROL-SLWDC, cache-man4137-MAN + - cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4143-MAN X-Timer: - - S1635949627.847901,VS0,VE243 + - S1667495472.850489,VS0,VE213 status: 200 OK code: 200 duration: "" diff --git a/fastly/fixtures/acls/get.yaml b/fastly/fixtures/acls/get.yaml index 5482977be..df3323c05 100644 --- a/fastly/fixtures/acls/get.yaml +++ b/fastly/fixtures/acls/get.yaml @@ -6,11 +6,11 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/5.1.1 (+github.com/fastly/go-fastly; go1.17) - url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/41/acl/test_acl + - FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15) + url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/24/acl/test_acl method: GET response: - body: '{"deleted_at":null,"name":"test_acl","updated_at":"2021-11-03T14:27:05Z","created_at":"2021-11-03T14:27:05Z","version":"41","service_id":"7i6HN3TK9wS159v2gPAZ8A","id":"66T8Pl5oaiXfTuRJwYv7G7"}' + body: '{"version":"24","service_id":"7i6HN3TK9wS159v2gPAZ8A","deleted_at":null,"name":"test_acl","updated_at":"2022-11-03T17:11:10Z","created_at":"2022-11-03T17:11:10Z","id":"9EcKIe9YsavIli7ueC0Pl5"}' headers: Accept-Ranges: - bytes @@ -19,7 +19,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 03 Nov 2021 14:27:06 GMT + - Thu, 03 Nov 2022 17:11:11 GMT Status: - 200 OK Strict-Transport-Security: @@ -33,9 +33,9 @@ interactions: X-Cache-Hits: - 0, 0 X-Served-By: - - cache-control-slwdc9037-CONTROL-SLWDC, cache-man4137-MAN + - cache-control-cp-aws-us-east-1-prod-3-CONTROL-AWS, cache-man4143-MAN X-Timer: - - S1635949626.841594,VS0,VE415 + - S1667495471.057824,VS0,VE305 status: 200 OK code: 200 duration: "" diff --git a/fastly/fixtures/acls/list.yaml b/fastly/fixtures/acls/list.yaml index 0c3f3c22b..14715ebc2 100644 --- a/fastly/fixtures/acls/list.yaml +++ b/fastly/fixtures/acls/list.yaml @@ -6,11 +6,11 @@ interactions: form: {} headers: User-Agent: - - FastlyGo/5.1.1 (+github.com/fastly/go-fastly; go1.17) - url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/41/acl + - FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15) + url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/24/acl method: GET response: - body: '[{"created_at":"2021-11-03T14:27:05Z","name":"test_acl","deleted_at":null,"id":"66T8Pl5oaiXfTuRJwYv7G7","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"41","updated_at":"2021-11-03T14:27:05Z"}]' + body: '[{"name":"test_acl","version":"24","updated_at":"2022-11-03T17:11:10Z","created_at":"2022-11-03T17:11:10Z","deleted_at":null,"service_id":"7i6HN3TK9wS159v2gPAZ8A","id":"9EcKIe9YsavIli7ueC0Pl5"}]' headers: Accept-Ranges: - bytes @@ -19,7 +19,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 03 Nov 2021 14:27:05 GMT + - Thu, 03 Nov 2022 17:11:11 GMT Status: - 200 OK Strict-Transport-Security: @@ -33,9 +33,9 @@ interactions: X-Cache-Hits: - 0, 0 X-Served-By: - - cache-control-slwdc9035-CONTROL-SLWDC, cache-man4137-MAN + - cache-control-cp-aws-us-east-1-prod-3-CONTROL-AWS, cache-man4143-MAN X-Timer: - - S1635949625.308924,VS0,VE491 + - S1667495471.726402,VS0,VE305 status: 200 OK code: 200 duration: "" diff --git a/fastly/fixtures/acls/update.yaml b/fastly/fixtures/acls/update.yaml index 1f32d634c..6adc43212 100644 --- a/fastly/fixtures/acls/update.yaml +++ b/fastly/fixtures/acls/update.yaml @@ -2,25 +2,25 @@ version: 1 interactions: - request: - body: Name=test_acl&ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=41&name=new_test_acl + body: Name=test_acl&ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=24&name=new_test_acl form: Name: - test_acl ServiceID: - 7i6HN3TK9wS159v2gPAZ8A ServiceVersion: - - "41" + - "24" name: - new_test_acl headers: Content-Type: - application/x-www-form-urlencoded User-Agent: - - FastlyGo/5.1.1 (+github.com/fastly/go-fastly; go1.17) - url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/41/acl/test_acl + - FastlyGo/6.8.0 (+github.com/fastly/go-fastly; go1.16.15) + url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/24/acl/test_acl method: PUT response: - body: '{"updated_at":"2021-11-03T14:27:05Z","name":"new_test_acl","deleted_at":null,"id":"66T8Pl5oaiXfTuRJwYv7G7","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"41","created_at":"2021-11-03T14:27:05Z"}' + body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","updated_at":"2022-11-03T17:11:10Z","name":"new_test_acl","deleted_at":null,"version":"24","id":"9EcKIe9YsavIli7ueC0Pl5","created_at":"2022-11-03T17:11:10Z"}' headers: Accept-Ranges: - bytes @@ -29,11 +29,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 03 Nov 2021 14:27:06 GMT + - Thu, 03 Nov 2022 17:11:11 GMT Fastly-Ratelimit-Remaining: - - "4997" + - "9990" Fastly-Ratelimit-Reset: - - "1635951600" + - "1667498400" Status: - 200 OK Strict-Transport-Security: @@ -47,9 +47,9 @@ interactions: X-Cache-Hits: - 0, 0 X-Served-By: - - cache-control-slwdc9037-CONTROL-SLWDC, cache-man4137-MAN + - cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4143-MAN X-Timer: - - S1635949626.318774,VS0,VE487 + - S1667495471.391349,VS0,VE395 status: 200 OK code: 200 duration: "" diff --git a/fastly/fixtures/acls/version.yaml b/fastly/fixtures/acls/version.yaml index 67e9405fd..b98ac2894 100644 --- a/fastly/fixtures/acls/version.yaml +++ b/fastly/fixtures/acls/version.yaml @@ -10,11 +10,11 @@ interactions: Content-Type: - application/x-www-form-urlencoded User-Agent: - - FastlyGo/5.1.1 (+github.com/fastly/go-fastly; go1.17) + - 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":41}' + body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":24}' headers: Accept-Ranges: - bytes @@ -23,11 +23,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 03 Nov 2021 14:27:05 GMT + - Thu, 03 Nov 2022 17:11:10 GMT Fastly-Ratelimit-Remaining: - - "4999" + - "9993" Fastly-Ratelimit-Reset: - - "1635951600" + - "1667498400" Status: - 200 OK Strict-Transport-Security: @@ -41,9 +41,9 @@ interactions: X-Cache-Hits: - 0, 0 X-Served-By: - - cache-control-slwdc9036-CONTROL-SLWDC, cache-man4137-MAN + - cache-control-cp-aws-us-east-1-prod-5-CONTROL-AWS, cache-man4143-MAN X-Timer: - - S1635949624.457823,VS0,VE545 + - S1667495470.641238,VS0,VE414 status: 200 OK code: 200 duration: ""