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

r/pagerduty_schedule: Add support for overflow #23

Merged
merged 4 commits into from
Aug 15, 2017
Merged

r/pagerduty_schedule: Add support for overflow #23

merged 4 commits into from
Aug 15, 2017

Conversation

heimweh
Copy link
Collaborator

@heimweh heimweh commented Aug 9, 2017

This PR adds support for passing overflow when creating/updating schedules.

This PR also fixes a bug when creating/updating schedules (related to rotation_virtual_start).

The issue here is that if a user specifies a rotation_virtual_start time to be:
2017-09-01T10:00:00+02:00 the API returns back:
2017-09-01T12:00:00+02:00.

With this fix in place, we get the correct rotation_virtual_start time, thus eliminating diff issues we've been seeing in the past. This has been confirmed working by PagerDuty support.

Fixes: #21

@heimweh heimweh added the bug label Aug 9, 2017
@heimweh
Copy link
Collaborator Author

heimweh commented Aug 9, 2017

Tests are passing:

$ make testacc TEST=./pagerduty
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./pagerduty -v  -timeout 120m
=== RUN   TestConfigEmptyToken
--- PASS: TestConfigEmptyToken (0.00s)
=== RUN   TestConfigSkipCredsValidation
2017/08/10 00:09:05 [INFO] PagerDuty client configured
--- PASS: TestConfigSkipCredsValidation (0.00s)
=== RUN   TestAccDataSourcePagerDutyEscalationPolicy_Basic
=== RUN   TestAccDataSourcePagerDutySchedule_Basic
=== RUN   TestAccDataSourcePagerDutyUser_Basic
=== RUN   TestAccDataSourcePagerDutyVendor_Basic
=== RUN   TestAccPagerDutyEscalationPolicy_import
=== RUN   TestAccPagerDutyMaintenanceWindow_import
=== RUN   TestAccPagerDutySchedule_import
=== RUN   TestAccPagerDutyServiceIntegration_import
=== RUN   TestAccPagerDutyService_import
=== RUN   TestAccPagerDutyServiceWithIncidentUrgency_import
=== RUN   TestAccPagerDutyTeamMembership_import
=== RUN   TestAccPagerDutyTeam_import
=== RUN   TestAccPagerDutyUser_import
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProviderImpl
--- PASS: TestProviderImpl (0.00s)
=== RUN   TestAccPagerDutyAddon_Basic
=== RUN   TestAccPagerDutyEscalationPolicy_Basic
=== RUN   TestAccPagerDutyEscalationPolicyWithTeams_Basic
=== RUN   TestAccPagerDutyMaintenanceWindow_Basic
=== RUN   TestAccPagerDutySchedule_Basic
=== RUN   TestAccPagerDutyScheduleOverflow_Basic
=== RUN   TestAccPagerDutySchedule_BasicWeek
=== RUN   TestAccPagerDutySchedule_Multi
=== RUN   TestAccPagerDutyServiceIntegration_Basic
=== RUN   TestAccPagerDutyServiceIntegrationGeneric_Basic
=== RUN   TestAccPagerDutyService_Basic
=== RUN   TestAccPagerDutyService_BasicWithIncidentUrgencyRules
=== RUN   TestAccPagerDutyService_FromBasicToCustomIncidentUrgencyRules
=== RUN   TestAccPagerDutyTeamMembership_Basic
=== RUN   TestAccPagerDutyTeam_Basic
=== RUN   TestAccPagerDutyUser_Basic
=== RUN   TestAccPagerDutyUserWithTeams_Basic
--- PASS: TestAccPagerDutyTeam_Basic (10.94s)
--- PASS: TestAccPagerDutySchedule_Multi (14.74s)
--- PASS: TestAccPagerDutyUser_Basic (15.11s)
--- PASS: TestAccPagerDutyTeamMembership_Basic (15.75s)
--- PASS: TestAccDataSourcePagerDutyEscalationPolicy_Basic (16.26s)
--- PASS: TestAccPagerDutyService_FromBasicToCustomIncidentUrgencyRules (21.50s)
--- PASS: TestAccPagerDutyService_BasicWithIncidentUrgencyRules (21.79s)
--- PASS: TestAccPagerDutyMaintenanceWindow_Basic (26.96s)
--- PASS: TestAccPagerDutyScheduleOverflow_Basic (16.32s)
--- PASS: TestAccPagerDutySchedule_BasicWeek (16.88s)
--- PASS: TestAccPagerDutyUserWithTeams_Basic (21.87s)
--- PASS: TestAccPagerDutySchedule_Basic (17.29s)
--- PASS: TestAccPagerDutyService_Basic (15.99s)
--- PASS: TestAccPagerDutyService_import (10.77s)
--- PASS: TestAccPagerDutyServiceIntegrationGeneric_Basic (23.74s)
--- PASS: TestAccPagerDutyUser_import (7.98s)
--- PASS: TestAccPagerDutyAddon_Basic (8.31s)
--- PASS: TestAccPagerDutyTeam_import (5.10s)
--- PASS: TestAccPagerDutyServiceIntegration_Basic (24.48s)
--- PASS: TestAccPagerDutyEscalationPolicyWithTeams_Basic (16.40s)
--- PASS: TestAccPagerDutyTeamMembership_import (10.13s)
--- PASS: TestAccPagerDutyEscalationPolicy_Basic (16.27s)
--- PASS: TestAccPagerDutyServiceWithIncidentUrgency_import (10.60s)
--- PASS: TestAccDataSourcePagerDutyVendor_Basic (4.32s)
--- PASS: TestAccPagerDutyEscalationPolicy_import (11.31s)
--- PASS: TestAccPagerDutySchedule_import (10.98s)
--- PASS: TestAccPagerDutyServiceIntegration_import (14.31s)
--- PASS: TestAccDataSourcePagerDutyUser_Basic (8.91s)
--- PASS: TestAccPagerDutyMaintenanceWindow_import (13.59s)
--- PASS: TestAccDataSourcePagerDutySchedule_Basic (11.66s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	59.939s

Copy link
Contributor

@grubernaut grubernaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work here!

@grubernaut grubernaut merged commit a478802 into PagerDuty:master Aug 15, 2017
@heimweh heimweh deleted the f-schedule-overflow branch August 15, 2017 13:59
@99
Copy link

99 commented Dec 24, 2017

hi @heimweh is it possible to deploy this fix ?

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.

No option to set "overflow" flag while creating/updating a schedule
3 participants