Skip to content

Commit

Permalink
add valid test case for names format validation
Browse files Browse the repository at this point in the history
  • Loading branch information
imjaroiswebdev committed Aug 21, 2023
1 parent 3a6043b commit 5fe6ebd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pagerduty/resource_pagerduty_escalation_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ func TestAccPagerDutyEscalationPolicy_FormatValidation(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccCheckPagerDutyEscalationPolicyDestroy,
Steps: []resource.TestStep{
// Just a valid name
{
Config: testAccCheckPagerDutyEscalationPolicyConfig(username, email, "SRE Escalation Policy"),
PlanOnly: true,
ExpectNonEmptyPlan: true,
},
// Blank Name
{
Config: testAccCheckPagerDutyEscalationPolicyConfig(username, email, ""),
Expand Down
6 changes: 6 additions & 0 deletions pagerduty/resource_pagerduty_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ func TestAccPagerDutyService_FormatValidation(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccCheckPagerDutyServiceDestroy,
Steps: []resource.TestStep{
// Just a valid name
{
Config: testAccCheckPagerDutyServiceConfig(username, email, escalationPolicy, "DB Technical Service"),
PlanOnly: true,
ExpectNonEmptyPlan: true,
},
// Blank Name
{
Config: testAccCheckPagerDutyServiceConfig(username, email, escalationPolicy, ""),
Expand Down

0 comments on commit 5fe6ebd

Please sign in to comment.