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

provider/pagerduty pagerduty_schedule - support for start_day_of_week (schedule restriction) #10069

Merged
merged 3 commits into from
Dec 18, 2016

Conversation

heimweh
Copy link
Contributor

@heimweh heimweh commented Nov 12, 2016

This should resolve #10033 (waiting for client library fix PagerDuty/go-pagerduty#52 to be merged)

@heimweh heimweh changed the title [WIP] Adding support for start_day_of_week (schedule restriction) [WIP] provider/pagerduty Adding support for start_day_of_week (schedule restriction) Nov 12, 2016
@paultyng
Copy link
Contributor

paultyng commented Dec 16, 2016

The PR on pagerduty has been merged, so probably just need a vendor update in this and its good to go.

You probably will want to modify one of the tests as well though to actually test the weekday restrictions.

Possibly just modify the TestAccPagerDutySchedule_Multi so that one of the layers use it.

@heimweh
Copy link
Contributor Author

heimweh commented Dec 16, 2016

@paultyng thanks for checking up on this one. That's awesome :)

Updated go-pagerduty and added tests and they seem to pass now.

$ make testacc TEST=./builtin/providers/pagerduty TESTARGS='-run=TestAccPagerDutySchedule_Multi'                                                                                                    23:16:30
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/16 23:16:56 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/pagerduty -v -run=TestAccPagerDutySchedule_Multi -timeout 120m
=== RUN   TestAccPagerDutySchedule_Multi
--- PASS: TestAccPagerDutySchedule_Multi (10.30s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/pagerduty	10.313s

$ make testacc TEST=./builtin/providers/pagerduty TESTARGS='-run=TestAccPagerDutySchedule_BasicWeek'                                                                                                23:28:34
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/16 23:32:25 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/pagerduty -v -run=TestAccPagerDutySchedule_BasicWeek -timeout 120m
=== RUN   TestAccPagerDutySchedule_BasicWeek
--- PASS: TestAccPagerDutySchedule_BasicWeek (11.05s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/pagerduty	11.062s

@heimweh heimweh changed the title [WIP] provider/pagerduty Adding support for start_day_of_week (schedule restriction) provider/pagerduty pagerduty_schedule - support for start_day_of_week (schedule restriction) Dec 16, 2016
@stack72
Copy link
Contributor

stack72 commented Dec 18, 2016

Hi @heimweh

Thanks so much for this - it LGTM! :)

% make testacc TEST=./builtin/providers/pagerduty
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/17 12:49:55 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/pagerduty -v  -timeout 120m
=== RUN   TestAccDataSourcePagerDutyUser_Basic
--- PASS: TestAccDataSourcePagerDutyUser_Basic (5.75s)
=== RUN   TestAccPagerDutyVendor_Basic
--- PASS: TestAccPagerDutyVendor_Basic (9.15s)
=== RUN   TestAccPagerDutyEscalationPolicy_import
--- PASS: TestAccPagerDutyEscalationPolicy_import (7.78s)
=== RUN   TestAccPagerDutySchedule_import
--- PASS: TestAccPagerDutySchedule_import (8.31s)
=== RUN   TestAccPagerDutyService_import
--- PASS: TestAccPagerDutyService_import (10.53s)
=== RUN   TestAccPagerDutyTeam_import
--- PASS: TestAccPagerDutyTeam_import (2.90s)
=== RUN   TestAccPagerDutyUser_import
--- PASS: TestAccPagerDutyUser_import (5.12s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProviderImpl
--- PASS: TestProviderImpl (0.00s)
=== RUN   TestAccPagerDutyEscalationPolicy_Basic
--- PASS: TestAccPagerDutyEscalationPolicy_Basic (12.87s)
=== RUN   TestAccPagerDutyEscalationPolicyWithTeams_Basic
--- PASS: TestAccPagerDutyEscalationPolicyWithTeams_Basic (14.64s)
=== RUN   TestAccPagerDutySchedule_Basic
--- PASS: TestAccPagerDutySchedule_Basic (11.65s)
=== RUN   TestAccPagerDutySchedule_BasicWeek
--- PASS: TestAccPagerDutySchedule_BasicWeek (10.37s)
=== RUN   TestAccPagerDutySchedule_Multi
--- PASS: TestAccPagerDutySchedule_Multi (8.59s)
=== RUN   TestAccPagerDutyServiceIntegration_Basic
--- PASS: TestAccPagerDutyServiceIntegration_Basic (27.97s)
=== RUN   TestAccPagerDutyService_Basic
--- PASS: TestAccPagerDutyService_Basic (11.93s)
=== RUN   TestAccPagerDutyTeam_Basic
--- PASS: TestAccPagerDutyTeam_Basic (4.58s)
=== RUN   TestAccPagerDutyUser_Basic
--- PASS: TestAccPagerDutyUser_Basic (5.67s)
=== RUN   TestAccPagerDutyUserWithTeams_Basic
--- PASS: TestAccPagerDutyUserWithTeams_Basic (13.98s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/pagerduty	171.821s

@stack72 stack72 merged commit 471299c into hashicorp:master Dec 18, 2016
@ghost
Copy link

ghost commented Apr 18, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provider/pagerduty: missing key for weekly layer restriction
3 participants