Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Parent Field to Teams Resource #319

Merged
merged 2 commits into from Apr 6, 2021

Conversation

stmcallister
Copy link
Contributor

@stmcallister stmcallister commented Apr 1, 2021

Even thought I can't spell hierarchy correctly in my branch name, I did add the parent field to the pagerduty_team resource. This feature is only available to accounts that have the Team Hierarchy feature enabled, and this is noted in the documentation. This was added to the resource as well as the datasource. Here are the test results:

TF_ACC=1 go test -run "TestAccPagerDutyTeam" ./pagerduty -v -timeout 120m       
=== RUN   TestAccPagerDutyTeamMembership_import
--- PASS: TestAccPagerDutyTeamMembership_import (6.56s)
=== RUN   TestAccPagerDutyTeamMembership_importWithRole
--- PASS: TestAccPagerDutyTeamMembership_importWithRole (5.99s)
=== RUN   TestAccPagerDutyTeam_import
--- PASS: TestAccPagerDutyTeam_import (3.96s)
=== RUN   TestAccPagerDutyTeamMembership_Basic
--- PASS: TestAccPagerDutyTeamMembership_Basic (5.93s)
=== RUN   TestAccPagerDutyTeamMembership_WithRole
--- PASS: TestAccPagerDutyTeamMembership_WithRole (6.32s)
=== RUN   TestAccPagerDutyTeam_Basic
--- PASS: TestAccPagerDutyTeam_Basic (4.99s)
=== RUN   TestAccPagerDutyTeam_Parent
--- PASS: TestAccPagerDutyTeam_Parent (5.58s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	39.973s

Also added the parent field to the pagerduty_team datasource.

TF_ACC=1 go test -run "TestAccDataSourcePagerDutyTeam_Basic" ./pagerduty -v -timeout 120m
=== RUN   TestAccDataSourcePagerDutyTeam_Basic
--- PASS: TestAccDataSourcePagerDutyTeam_Basic (4.44s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	15.835s

Addresses: #207

Updated the resourcePagerDutyResponsePlayUpdate function to load the ResponsePlay object after updating. Here are the test results:

TF_ACC=1 go test -run "TestAccPagerDutyResponsePlay" ./pagerduty -v -timeout 120m
=== RUN   TestAccPagerDutyResponsePlay_import
--- PASS: TestAccPagerDutyResponsePlay_import (8.11s)
=== RUN   TestAccPagerDutyResponsePlay_Basic
--- PASS: TestAccPagerDutyResponsePlay_Basic (8.46s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	17.259s

@stmcallister stmcallister removed the request for review from heimweh April 6, 2021 22:59
@stmcallister stmcallister merged commit c34650c into PagerDuty:master Apr 6, 2021
@stmcallister stmcallister deleted the team-heirarchy branch April 6, 2021 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants