Skip to content

Commit

Permalink
use correct key structure for checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Nov 19, 2019
1 parent c331951 commit 5225056
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cloudflare/resource_cloudflare_access_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestAccCloudflareAccessGroupConfig_Basic(t *testing.T) {
testAccCheckCloudflareAccessGroupExists(name, &accessGroup),
resource.TestCheckResourceAttr(name, "account_id", accountID),
resource.TestCheckResourceAttr(name, "name", resourceName),
resource.TestCheckResourceAttr(name, "include.email", email),
resource.TestCheckResourceAttr(name, "include.0.email.0", email),
),
},
},
Expand All @@ -60,8 +60,8 @@ func TestAccCloudflareAccessGroup_Exclude(t *testing.T) {
testAccCheckCloudflareAccessGroupExists(name, &accessGroup),
resource.TestCheckResourceAttr(name, "account_id", accountID),
resource.TestCheckResourceAttr(name, "name", resourceName),
resource.TestCheckResourceAttr(name, "include.email", email),
resource.TestCheckResourceAttr(name, "exclude.email", email),
resource.TestCheckResourceAttr(name, "include.0.email.0", email),
resource.TestCheckResourceAttr(name, "exclude.0.email.0", email),
),
},
},
Expand All @@ -86,8 +86,8 @@ func TestAccCloudflareAccessGroup_Require(t *testing.T) {
testAccCheckCloudflareAccessGroupExists(name, &accessGroup),
resource.TestCheckResourceAttr(name, "account_id", accountID),
resource.TestCheckResourceAttr(name, "name", resourceName),
resource.TestCheckResourceAttr(name, "include.email", email),
resource.TestCheckResourceAttr(name, "require.email", email),
resource.TestCheckResourceAttr(name, "include.0.email.0", email),
resource.TestCheckResourceAttr(name, "require.0.email.0", email),
),
},
},
Expand All @@ -112,9 +112,9 @@ func TestAccCloudflareAccessGroup_FullConfig(t *testing.T) {
testAccCheckCloudflareAccessGroupExists(name, &accessGroup),
resource.TestCheckResourceAttr(name, "account_id", accountID),
resource.TestCheckResourceAttr(name, "name", resourceName),
resource.TestCheckResourceAttr(name, "include.email", email),
resource.TestCheckResourceAttr(name, "exclude.email", email),
resource.TestCheckResourceAttr(name, "require.email", email),
resource.TestCheckResourceAttr(name, "include.0.email.0", email),
resource.TestCheckResourceAttr(name, "exclude.0.email.0", email),
resource.TestCheckResourceAttr(name, "require.0.email.0", email),
),
},
},
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestAccCloudflareAccessGroup_Updated(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckCloudflareAccessGroupExists("cloudflare_access_group.test", &after),
testAccCheckCloudflareAccessGroupIDUnchanged(&before, &after),
resource.TestCheckResourceAttr(name, "include.email", "test-changed@example.com"),
resource.TestCheckResourceAttr(name, "include.0.email.0", "test-changed@example.com"),
),
},
},
Expand Down Expand Up @@ -186,11 +186,11 @@ func TestAccCloudflareAccessGroup_CreateAfterManualDestroy(t *testing.T) {
resource.TestCheckResourceAttr(
"cloudflare_access_group.test", "name", fmt.Sprintf("%s/updated", name)),
resource.TestCheckResourceAttr(
"cloudflare_access_group.test", "include.email", email),
"cloudflare_access_group.test", "include.0.email.0", email),
resource.TestCheckResourceAttr(
"cloudflare_access_group.test", "exclude.email", email),
"cloudflare_access_group.test", "exclude.0.email.0", email),
resource.TestCheckResourceAttr(
"cloudflare_access_group.test", "require.email", email),
"cloudflare_access_group.test", "require.0.email.0", email),
),
},
},
Expand Down

1 comment on commit 5225056

@matthieudolci
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Please sign in to comment.