Skip to content

Commit

Permalink
update cassettes
Browse files Browse the repository at this point in the history
  • Loading branch information
apiazza-dd committed Oct 31, 2024
1 parent 6a0fdda commit 6bb7744
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-04-10T08:26:30.816762-04:00
2024-10-31T16:01:18.287761-04:00
163 changes: 107 additions & 56 deletions datadog/tests/cassettes/TestAccIntegrationCloudflareAccountBasic.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,109 @@
---
version: 2
interactions:
- request:
body: |
{"data":{"attributes":{"api_key":"1234567891012331asdd","email":"[email protected]","name":"tf-TestAccIntegrationCloudflareAccountBasic-local-1681129590"},"type":"cloudflare-accounts"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
url: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts
method: POST
id: 0
response:
body: |
{"data":{"type":"cloudflare-accounts","attributes":{"email":"[email protected]","name":"tf-TestAccIntegrationCloudflareAccountBasic-local-1681129590"},"id":"9e9054f8a21fd8dd20feee8e9fa31447"}}
headers:
Content-Type:
- application/json
status: 201 Created
code: 201
duration: "0ms"
- request:
body: ""
form: {}
headers:
Accept:
- application/json
url: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/9e9054f8a21fd8dd20feee8e9fa31447
method: GET
id: 1
response:
body: |
{"data":{"type":"cloudflare-accounts","id":"9e9054f8a21fd8dd20feee8e9fa31447","attributes":{"email":"[email protected]","name":"tf-TestAccIntegrationCloudflareAccountBasic-local-1681129590"}}}
headers:
Content-Type:
- application/json
status: 200 OK
code: 200
duration: "0ms"
- request:
body: ""
form: {}
headers:
Accept:
- '*/*'
url: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/9e9054f8a21fd8dd20feee8e9fa31447
method: DELETE
id: 2
response:
body: ""
headers:
Content-Type:
- text/html; charset=utf-8
status: 204 No Content
code: 204
duration: "0ms"
- id: 0
request:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 226
transfer_encoding: []
trailer: {}
host: api.datadoghq.com
remote_addr: ""
request_uri: ""
body: |
{"data":{"attributes":{"api_key":"12345","email":"[email protected]","name":"tf-TestAccIntegrationCloudflareAccountBasic-local-1730404878","resources":["web"]},"type":"cloudflare-accounts"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
url: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts
method: POST
response:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
transfer_encoding:
- chunked
trailer: {}
content_length: -1
uncompressed: true
body: |
{"data":{"type":"cloudflare-accounts","attributes":{"name":"tf-TestAccIntegrationCloudflareAccountBasic-local-1730404878","email":"[email protected]","zones":[],"resources":["web"]},"id":"0b3c21a781ccb57130efd3f883cf090d1b4717381d212361d285a721c5b3b559"}}
headers:
Content-Type:
- application/json
status: 201 Created
code: 201
duration: 654.2955ms
- id: 1
request:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 0
transfer_encoding: []
trailer: {}
host: api.datadoghq.com
remote_addr: ""
request_uri: ""
body: ""
form: {}
headers:
Accept:
- application/json
url: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/0b3c21a781ccb57130efd3f883cf090d1b4717381d212361d285a721c5b3b559
method: GET
response:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
transfer_encoding:
- chunked
trailer: {}
content_length: -1
uncompressed: true
body: |
{"data":{"type":"cloudflare-accounts","attributes":{"name":"tf-TestAccIntegrationCloudflareAccountBasic-local-1730404878","email":"[email protected]","zones":[],"resources":["web"]},"id":"0b3c21a781ccb57130efd3f883cf090d1b4717381d212361d285a721c5b3b559"}}
headers:
Content-Type:
- application/json
status: 200 OK
code: 200
duration: 76.709916ms
- id: 2
request:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 0
transfer_encoding: []
trailer: {}
host: api.datadoghq.com
remote_addr: ""
request_uri: ""
body: ""
form: {}
headers:
Accept:
- '*/*'
url: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/0b3c21a781ccb57130efd3f883cf090d1b4717381d212361d285a721c5b3b559
method: DELETE
response:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
transfer_encoding: []
trailer: {}
content_length: 0
uncompressed: false
body: ""
headers:
Content-Type:
- text/html; charset=utf-8
status: 204 No Content
code: 204
duration: 180.512083ms
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (

func TestAccIntegrationCloudflareAccountBasic(t *testing.T) {
t.Parallel()
if !isReplaying() {
t.Skip("This test is replay only")
}
// if !isReplaying() {
// t.Skip("This test is replay only")
// }
ctx, providers, accProviders := testAccFrameworkMuxProviders(context.Background(), t)
uniq := uniqueEntityName(ctx, t)

Expand All @@ -29,17 +29,15 @@ func TestAccIntegrationCloudflareAccountBasic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckDatadogIntegrationCloudflareAccountExists(providers.frameworkProvider),
resource.TestCheckResourceAttr(
"datadog_integration_cloudflare_account.foo", "api_key", "1234567891012331asdd"),
"datadog_integration_cloudflare_account.foo", "api_key", "12345"),
resource.TestCheckResourceAttr(
"datadog_integration_cloudflare_account.foo", "email", "test-email@example.com"),
"datadog_integration_cloudflare_account.foo", "email", "test@email.com"),
resource.TestCheckResourceAttr(
"datadog_integration_cloudflare_account.foo", "name", uniq),
resource.TestCheckResourceAttr(
"datadog_integration_cloudflare_account.foo", "resources.#", "2"),
resource.TestCheckResourceAttr(
"datadog_integration_cloudflare_account.foo", "resources.0", "lb"),
"datadog_integration_cloudflare_account.foo", "resources.#", "1"),
resource.TestCheckResourceAttr(
"datadog_integration_cloudflare_account.foo", "resources.1", "worker"),
"datadog_integration_cloudflare_account.foo", "resources.0", "web"),
),
},
},
Expand All @@ -49,10 +47,10 @@ func TestAccIntegrationCloudflareAccountBasic(t *testing.T) {
func testAccCheckDatadogIntegrationCloudflareAccount(uniq string) string {
return fmt.Sprintf(`
resource "datadog_integration_cloudflare_account" "foo" {
api_key = "1234567891012331asdd"
email = "test-email@example.com"
api_key = "12345"
email = "test@email.com"
name = "%s"
resources = ["lb", "worker"]
resources = ["web"]
}`, uniq)
}

Expand Down

0 comments on commit 6bb7744

Please sign in to comment.