diff --git a/pagerduty/resource_pagerduty_event_orchestration_path_global_test.go b/pagerduty/resource_pagerduty_event_orchestration_path_global_test.go index 440ea04a1..3f7777baa 100644 --- a/pagerduty/resource_pagerduty_event_orchestration_path_global_test.go +++ b/pagerduty/resource_pagerduty_event_orchestration_path_global_test.go @@ -41,6 +41,10 @@ func TestAccPagerDutyEventOrchestrationPathGlobal_Basic(t *testing.T) { Config: testAccCheckPagerDutyEventOrchestrationGlobalDefaultConfig(team, escalationPolicy, service, orch), Check: resource.ComposeTestCheckFunc(baseChecks...), }, + { + Config: testAccCheckPagerDutyEventOrchestrationGlobalDefaultWithEscalationPolicy(team, escalationPolicy, service, orch), + Check: resource.ComposeTestCheckFunc(baseChecks...), + }, // Adding/updating/deleting automation_action properties { @@ -277,7 +281,7 @@ func createBaseGlobalOrchConfig(t, ep, s, o string) string { `, t, ep, s, o) } -func testAccCheckPagerDutyEventOrchestrationGlobalDefaultConfigDefaultConfig(t, ep, s, o string) string { +func testAccCheckPagerDutyEventOrchestrationGlobalDefaultConfig(t, ep, s, o string) string { return fmt.Sprintf("%s%s", createBaseGlobalOrchConfig(t, ep, s, o), `resource "pagerduty_event_orchestration_global" "my_global_orch" { event_orchestration = pagerduty_event_orchestration.orch.id diff --git a/pagerduty/resource_pagerduty_event_orchestration_path_service_test.go b/pagerduty/resource_pagerduty_event_orchestration_path_service_test.go index ff91dcbd0..19c14313b 100644 --- a/pagerduty/resource_pagerduty_event_orchestration_path_service_test.go +++ b/pagerduty/resource_pagerduty_event_orchestration_path_service_test.go @@ -43,6 +43,10 @@ func TestAccPagerDutyEventOrchestrationPathService_Basic(t *testing.T) { Config: testAccCheckPagerDutyEventOrchestrationPathServiceDefaultConfig(escalationPolicy, service), Check: resource.ComposeTestCheckFunc(baseChecks...), }, + { + Config: testAccCheckPagerDutyEventOrchestrationServiceEscalationPolicy(escalationPolicy, service), + Check: resource.ComposeTestCheckFunc(baseChecks...), + }, // Adding/updating/deleting automation_action properties { Config: testAccCheckPagerDutyEventOrchestrationPathServiceAutomationActionsConfig(escalationPolicy, service), @@ -341,6 +345,31 @@ func createBaseServicePathConfig(ep, s string) string { `, ep, s) } +func testAccCheckPagerDutyEventOrchestrationServiceEscalationPolicy(ep, s string) string { + return fmt.Sprintf("%s%s", createBaseServicePathConfig(ep, s), + `resource "pagerduty_event_orchestration_service" "serviceA" { + service = pagerduty_service.bar.id + + set { + id = "start" + } + + catch_all { + actions { } + } + set { + id = "start" + rule { + label = "rule 1" + actions { + "escalation_policy": "POLICY" + } + } + } + } + `) +} + func testAccCheckPagerDutyEventOrchestrationPathServiceDefaultConfig(ep, s string) string { return fmt.Sprintf("%s%s", createBaseServicePathConfig(ep, s), `resource "pagerduty_event_orchestration_service" "serviceA" {