-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using protocol v5 Add validation to require support_hours when incident_urgency_rule is "use_support_hours" Improve pagerduty_service testing Add validations for pagerduty_service properties inside blocks
- Loading branch information
Showing
24 changed files
with
4,512 additions
and
674 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,9 @@ func TestAccPagerDutyService_import(t *testing.T) { | |
service := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
|
||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
Providers: testAccProviders, | ||
CheckDestroy: testAccCheckPagerDutyServiceDestroy, | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
ProtoV5ProviderFactories: testAccProtoV5ProviderFactories(), | ||
CheckDestroy: testAccCheckPagerDutyServiceDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccCheckPagerDutyServiceConfig(username, email, escalationPolicy, service), | ||
|
@@ -32,16 +32,16 @@ func TestAccPagerDutyService_import(t *testing.T) { | |
}) | ||
} | ||
|
||
func TestAccPagerDutyServiceWithIncidentUrgency_import(t *testing.T) { | ||
func TestAccPagerDutyService_import_WithIncidentUrgency(t *testing.T) { | ||
username := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
email := fmt.Sprintf("%[email protected]", username) | ||
escalationPolicy := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
service := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
|
||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
Providers: testAccProviders, | ||
CheckDestroy: testAccCheckPagerDutyServiceDestroy, | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
ProtoV5ProviderFactories: testAccProtoV5ProviderFactories(), | ||
CheckDestroy: testAccCheckPagerDutyServiceDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccCheckPagerDutyServiceWithIncidentUrgencyRulesConfig(username, email, escalationPolicy, service), | ||
|
@@ -56,16 +56,16 @@ func TestAccPagerDutyServiceWithIncidentUrgency_import(t *testing.T) { | |
}) | ||
} | ||
|
||
func TestAccPagerDutyServiceWithAlertGroupingParameters_import(t *testing.T) { | ||
func TestAccPagerDutyService_import_WithAlertGroupingParameters(t *testing.T) { | ||
username := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
email := fmt.Sprintf("%[email protected]", username) | ||
escalationPolicy := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
service := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
|
||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
Providers: testAccProviders, | ||
CheckDestroy: testAccCheckPagerDutyServiceDestroy, | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
ProtoV5ProviderFactories: testAccProtoV5ProviderFactories(), | ||
CheckDestroy: testAccCheckPagerDutyServiceDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccCheckPagerDutyServiceConfigWithAlertContentGrouping(username, email, escalationPolicy, service), | ||
|
@@ -88,16 +88,16 @@ func TestAccPagerDutyServiceWithAlertGroupingParameters_import(t *testing.T) { | |
}) | ||
} | ||
|
||
func TestAccPagerDutyServiceWithAutoPauseNotifications_import(t *testing.T) { | ||
func TestAccPagerDutyService_import_WithAutoPauseNotifications(t *testing.T) { | ||
username := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
email := fmt.Sprintf("%[email protected]", username) | ||
escalationPolicy := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
service := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
|
||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
Providers: testAccProviders, | ||
CheckDestroy: testAccCheckPagerDutyServiceDestroy, | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
ProtoV5ProviderFactories: testAccProtoV5ProviderFactories(), | ||
CheckDestroy: testAccCheckPagerDutyServiceDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccCheckPagerDutyServiceConfigWithAutoPauseNotificationsParameters(username, email, escalationPolicy, service), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.