Skip to content

Commit

Permalink
Add acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
Qantas94Heavy committed Mar 1, 2023
1 parent 081854f commit 4245bef
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func TestAccCloudflareNotificationPolicy_Basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "alert_type", "universal_ssl_event_type"),
resource.TestCheckResourceAttr(resourceName, consts.AccountIDSchemaKey, accountID),
resource.TestCheckResourceAttr(resourceName, "email_integration.#", "2"),
),
},
{
Expand All @@ -48,7 +49,7 @@ func TestAccCloudflareNotificationPolicy_Basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "description", updatedPolicyDesc),
resource.TestCheckResourceAttr(resourceName, "enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "alert_type", "universal_ssl_event_type"),
resource.TestCheckResourceAttr(resourceName, consts.AccountIDSchemaKey, accountID),
resource.TestCheckResourceAttr(resourceName, "email_integration.#", "2"),
),
},
},
Expand All @@ -67,6 +68,10 @@ func testCheckCloudflareNotificationPolicy(name, accountID string) string {
name = ""
id = "test@example.com"
}
email_integration {
name = ""
id = "test2@example.com"
}
}`, name, accountID)
}

Expand All @@ -82,6 +87,10 @@ func testCheckCloudflareNotificationPolicyUpdated(resName, policyName, policyDes
name = ""
id = "test@example.com"
}
email_integration {
name = ""
id = "test2@example.com"
}
}`, resName, policyName, policyDesc, accountID)
}

Expand Down

0 comments on commit 4245bef

Please sign in to comment.