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

Update terraform plugin SDK from 1.0.0 to 1.7.0 #188

Merged

Conversation

pdecat
Copy link
Contributor

@pdecat pdecat commented Mar 9, 2020

This PR updates the terraform-plugin-sdk from 1.0.0 to 1.7.0:

go get -u github.com/hashicorp/terraform-plugin-sdk
go mod tidy
rm -rf vendor/
go mod vendor
git add .

This resolves an issue I faced while working on another PR:

# make testacc TEST=./pagerduty TESTARGS='-run=TestAccPagerDutyExtension -count=1'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./pagerduty -v -run=TestAccPagerDutyExtension -count=1 -timeout 120m
# github.com/hashicorp/terraform-plugin-sdk/internal/earlyconfig
../../../../pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.0.0/internal/earlyconfig/config.go:89:20: cannot range over reqs (type *tfconfig.ProviderRequirement)
FAIL    github.com/terraform-providers/terraform-provider-pagerduty/pagerduty [build failed]
FAIL
make: *** [GNUmakefile:17: testacc] Error 2

See https://github.com/terraform-providers/terraform-provider-datadog/pull/346#issuecomment-581876259 for a similar issue and resolution.

@ghost ghost added the size/XXL label Mar 9, 2020
@pdecat
Copy link
Contributor Author

pdecat commented Mar 9, 2020

Acceptance test results:

# make testacc TEST=./pagerduty TESTARGS='-count=1'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./pagerduty -v -count=1 -timeout 120m
=== RUN   TestConfigEmptyToken
--- PASS: TestConfigEmptyToken (0.00s)
=== RUN   TestConfigSkipCredsValidation
2020/03/09 16:11:29 [INFO] PagerDuty client configured
--- PASS: TestConfigSkipCredsValidation (0.00s)
=== RUN   TestAccDataSourcePagerDutyEscalationPolicy_Basic
--- PASS: TestAccDataSourcePagerDutyEscalationPolicy_Basic (10.55s)
=== RUN   TestAccDataSourcePagerDutyExtensionSchema_Basic
--- PASS: TestAccDataSourcePagerDutyExtensionSchema_Basic (4.81s)
=== RUN   TestAccDataSourcePagerDutySchedule_Basic
--- PASS: TestAccDataSourcePagerDutySchedule_Basic (10.29s)
=== RUN   TestAccDataSourcePagerDutyService_Basic
--- PASS: TestAccDataSourcePagerDutyService_Basic (11.43s)
=== RUN   TestAccDataSourcePagerDutyTeam_Basic
--- PASS: TestAccDataSourcePagerDutyTeam_Basic (6.20s)
=== RUN   TestAccDataSourcePagerDutyUser_Basic
--- PASS: TestAccDataSourcePagerDutyUser_Basic (8.10s)
=== RUN   TestAccDataSourcePagerDutyVendor_Basic
--- PASS: TestAccDataSourcePagerDutyVendor_Basic (4.60s)
=== RUN   TestAccDataSourcePagerDutyVendor_ExactMatch
--- PASS: TestAccDataSourcePagerDutyVendor_ExactMatch (4.70s)
=== RUN   TestAccDataSourcePagerDutyVendor_SpecialChars
--- PASS: TestAccDataSourcePagerDutyVendor_SpecialChars (4.63s)
=== RUN   TestAccPagerDutyEscalationPolicy_import
--- PASS: TestAccPagerDutyEscalationPolicy_import (8.76s)
=== RUN   TestAccPagerDutyEventRule_import
--- PASS: TestAccPagerDutyEventRule_import (5.11s)
=== RUN   TestAccPagerDutyExtension_import
--- PASS: TestAccPagerDutyExtension_import (12.32s)
=== RUN   TestAccPagerDutyMaintenanceWindow_import
--- PASS: TestAccPagerDutyMaintenanceWindow_import (11.13s)
=== RUN   TestAccPagerDutySchedule_import
--- PASS: TestAccPagerDutySchedule_import (9.52s)
=== RUN   TestAccPagerDutyServiceIntegration_import
--- PASS: TestAccPagerDutyServiceIntegration_import (12.94s)
=== RUN   TestAccPagerDutyService_import
--- PASS: TestAccPagerDutyService_import (9.90s)
=== RUN   TestAccPagerDutyServiceWithIncidentUrgency_import
--- PASS: TestAccPagerDutyServiceWithIncidentUrgency_import (10.18s)
=== RUN   TestAccPagerDutyTeamMembership_import
--- PASS: TestAccPagerDutyTeamMembership_import (8.59s)
=== RUN   TestAccPagerDutyTeam_import
--- PASS: TestAccPagerDutyTeam_import (6.12s)
=== RUN   TestAccPagerDutyUserContactMethod_import
--- PASS: TestAccPagerDutyUserContactMethod_import (8.48s)
=== RUN   TestAccPagerDutyUser_import
--- PASS: TestAccPagerDutyUser_import (7.81s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProviderImpl
--- PASS: TestProviderImpl (0.00s)
=== RUN   TestAccPagerDutyAddon_Basic
--- PASS: TestAccPagerDutyAddon_Basic (8.08s)
=== RUN   TestAccPagerDutyEscalationPolicy_Basic
--- PASS: TestAccPagerDutyEscalationPolicy_Basic (13.35s)
=== RUN   TestAccPagerDutyEscalationPolicyWithTeams_Basic
--- PASS: TestAccPagerDutyEscalationPolicyWithTeams_Basic (12.92s)
=== RUN   TestAccPagerDutyEventRule_Basic
    TestAccPagerDutyEventRule_Basic: testing.go:654: Step 1 error: errors during apply:

        Error: POST API call to https://api.pagerduty.com/event_rules failed: 409 Conflict

          on /tmp/tf-test562488633/main.tf line 2:
          (source code not available)


--- FAIL: TestAccPagerDutyEventRule_Basic (5.60s)
=== RUN   TestAccPagerDutyExtension_Basic
--- PASS: TestAccPagerDutyExtension_Basic (18.29s)
=== RUN   TestAccPagerDutyMaintenanceWindow_Basic
--- PASS: TestAccPagerDutyMaintenanceWindow_Basic (17.87s)
=== RUN   TestAccPagerDutySchedule_Basic
--- PASS: TestAccPagerDutySchedule_Basic (14.97s)
=== RUN   TestAccPagerDutyScheduleOverflow_Basic
--- PASS: TestAccPagerDutyScheduleOverflow_Basic (15.24s)
=== RUN   TestAccPagerDutySchedule_BasicWeek
--- PASS: TestAccPagerDutySchedule_BasicWeek (14.16s)
=== RUN   TestAccPagerDutySchedule_Multi
--- PASS: TestAccPagerDutySchedule_Multi (9.10s)
=== RUN   TestAccPagerDutyServiceIntegration_Basic
--- PASS: TestAccPagerDutyServiceIntegration_Basic (19.86s)
=== RUN   TestAccPagerDutyServiceIntegrationGeneric_Basic
--- PASS: TestAccPagerDutyServiceIntegrationGeneric_Basic (17.95s)
=== RUN   TestAccPagerDutyService_Basic
--- PASS: TestAccPagerDutyService_Basic (19.56s)
=== RUN   TestAccPagerDutyService_AlertGrouping
--- PASS: TestAccPagerDutyService_AlertGrouping (15.13s)
=== RUN   TestAccPagerDutyService_BasicWithIncidentUrgencyRules
--- PASS: TestAccPagerDutyService_BasicWithIncidentUrgencyRules (20.09s)
=== RUN   TestAccPagerDutyService_FromBasicToCustomIncidentUrgencyRules
--- PASS: TestAccPagerDutyService_FromBasicToCustomIncidentUrgencyRules (14.27s)
=== RUN   TestAccPagerDutyService_SupportHoursChange
--- PASS: TestAccPagerDutyService_SupportHoursChange (14.55s)
=== RUN   TestAccPagerDutyTeamMembership_Basic
--- PASS: TestAccPagerDutyTeamMembership_Basic (8.24s)
=== RUN   TestAccPagerDutyTeam_Basic
--- PASS: TestAccPagerDutyTeam_Basic (9.15s)
=== RUN   TestAccPagerDutyUserContactMethodEmail_Basic
--- PASS: TestAccPagerDutyUserContactMethodEmail_Basic (13.26s)
=== RUN   TestAccPagerDutyUserContactMethodPhone_Basic
--- PASS: TestAccPagerDutyUserContactMethodPhone_Basic (13.41s)
=== RUN   TestAccPagerDutyUserContactMethodSMS_Basic
--- PASS: TestAccPagerDutyUserContactMethodSMS_Basic (13.41s)
=== RUN   TestAccPagerDutyUser_Basic
--- PASS: TestAccPagerDutyUser_Basic (10.96s)
=== RUN   TestAccPagerDutyUserWithTeams_Basic
--- PASS: TestAccPagerDutyUserWithTeams_Basic (17.49s)
FAIL
FAIL    github.com/terraform-providers/terraform-provider-pagerduty/pagerduty   513.134s
FAIL
make: *** [GNUmakefile:17: testacc] Error 1

The only failure in TestAccPagerDutyEventRule_Basic is already reported in #175.

@stmcallister
Copy link
Contributor

I just started hitting the same issues! Thanks for this PR!

@stmcallister stmcallister merged commit 5441fde into PagerDuty:master Mar 17, 2020
@pdecat pdecat deleted the update_terraform_plugin_sdk_1.7.0 branch March 17, 2020 17:09
stmcallister pushed a commit that referenced this pull request Mar 19, 2020
adding PRs #188 and #190.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants