PagerDuty / terraform-provider-pagerduty

Terraform PagerDuty provider
https://www.terraform.io/docs/providers/pagerduty/
Mozilla Public License 2.0
206 stars 210 forks source link

[CSGI-2782] Fix import for incident workflow #820

Closed cjgajard closed 7 months ago

cjgajard commented 7 months ago

Resolves #809

Test case introduced to cover regressions

$ make test TESTARGS='-v -run TestFlattenIncidentWorkflowStepsWithoutSpecifiedSteps'
==> Checking that code complies with gofmt requirements...
go test -i $(go list ./... |grep -v 'vendor') || exit 1
?       github.com/terraform-providers/terraform-provider-pagerduty     [no test files]
echo $(go list ./... |grep -v 'vendor') | \
                xargs -t -n4 go test -v -run TestFlattenIncidentWorkflowStepsWithoutSpecifiedSteps -timeout=30s -parallel=4
go test -v -run TestFlattenIncidentWorkflowStepsWithoutSpecifiedSteps -timeout=30s -parallel=4 github.com/terraform-providers/terraform-provider-pagerduty github.com/terraform-providers/terraform-provider-pagerduty/pagerduty github.com/terraform-providers/terraform-provider-pagerduty/pagerdutyplugin github.com/terraform-providers/terraform-provider-pagerduty/util
?       github.com/terraform-providers/terraform-provider-pagerduty     [no test files]
?       github.com/terraform-providers/terraform-provider-pagerduty/util        [no test files]
=== RUN   TestFlattenIncidentWorkflowStepsWithoutSpecifiedSteps
--- PASS: TestFlattenIncidentWorkflowStepsWithoutSpecifiedSteps (0.00s)
PASS
ok      github.com/terraform-providers/terraform-provider-pagerduty/pagerduty   1.005s
testing: warning: no tests to run
PASS
ok      github.com/terraform-providers/terraform-provider-pagerduty/pagerdutyplugin     0.597s [no tests to run]

Acceptance Tests result...

$ PAGERDUTY_ACC_INCIDENT_WORKFLOWS=1 make testacc TESTARGS='-run TestAccPagerDutyIncidentWorkflow'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccPagerDutyIncidentWorkflow -timeout 120m
?       github.com/terraform-providers/terraform-provider-pagerduty     [no test files]
?       github.com/terraform-providers/terraform-provider-pagerduty/util        [no test files]
=== RUN   TestAccPagerDutyIncidentWorkflow_import
--- PASS: TestAccPagerDutyIncidentWorkflow_import (13.53s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_import
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_import (22.20s)
=== RUN   TestAccPagerDutyIncidentWorkflow_Basic
--- PASS: TestAccPagerDutyIncidentWorkflow_Basic (20.49s)
=== RUN   TestAccPagerDutyIncidentWorkflow_Team
--- PASS: TestAccPagerDutyIncidentWorkflow_Team (12.54s)
=== RUN   TestAccPagerDutyIncidentWorkflow_InlineInputs
--- PASS: TestAccPagerDutyIncidentWorkflow_InlineInputs (17.84s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_BadType
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_BadType (2.72s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_ConditionWithManualType
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_ConditionWithManualType (2.63s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_ConditionalTypeWithoutCondition
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_ConditionalTypeWithoutCondition (2.56s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_SubscribedToAllWithInvalidServices
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_SubscribedToAllWithInvalidServices (2.55s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_BasicManual
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_BasicManual (22.02s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_BasicConditionalAllServices
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_BasicConditionalAllServices (19.01s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_ChangeTypeCausesReplace
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_ChangeTypeCausesReplace (19.38s)
=== RUN   TestAccPagerDutyIncidentWorkflowTrigger_CannotChangeType
--- PASS: TestAccPagerDutyIncidentWorkflowTrigger_CannotChangeType (21.50s)
PASS
ok      github.com/terraform-providers/terraform-provider-pagerduty/pagerduty   179.918s
testing: warning: no tests to run
PASS
ok      github.com/terraform-providers/terraform-provider-pagerduty/pagerdutyplugin     (cached) [no tests to run]