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

Paginated GetMembers #305

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

stmcallister
Copy link
Contributor

Importing team members requires getting a list of team members from the PagerDuty API and finding the one that matches the given ID. There was a bug in the heimweh/go-pagerduty library that didn't take into account that the GET operation is paginated. If the requested team member was on the second page of returned team members then the import operation would fail. This PR addresses that bug. #288

TF_ACC=1 go test -run "TestAccPagerDutyTeamMembership_import" ./pagerduty -v -timeout 120m
=== RUN   TestAccPagerDutyTeamMembership_import
--- PASS: TestAccPagerDutyTeamMembership_import (7.11s)
=== RUN   TestAccPagerDutyTeamMembership_importWithRole
--- PASS: TestAccPagerDutyTeamMembership_importWithRole (6.08s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	14.484s

Also added routing_keys to the rulesets datasource.

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

@stmcallister stmcallister merged commit f9628a9 into PagerDuty:master Feb 26, 2021
@stmcallister stmcallister deleted the team-member-import-fix branch February 27, 2021 02:08
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.

2 participants