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

Suppress Equal Diff on Schedule Layer Timestamps #321

Merged

Conversation

stmcallister
Copy link
Contributor

This change allows the provider to treat UTC values for the start, rotation_virtual_start, and end fields on pagerduty_schedule.layer as equal to the equivalent offset returned by the PagerDuty API. This comes in handy for handling daylight savings. This change also validates that the timestamps are the proper format as well.

Related issue: #200

Test output on schedule object

 TF_ACC=1 go test -run "TestAccPagerDutySchedule" ./pagerduty -v -timeout 120m 
=== RUN   TestAccPagerDutySchedule_import
--- PASS: TestAccPagerDutySchedule_import (7.16s)
=== RUN   TestAccPagerDutySchedule_Basic
--- PASS: TestAccPagerDutySchedule_Basic (8.21s)
=== RUN   TestAccPagerDutyScheduleOverflow_Basic
--- PASS: TestAccPagerDutyScheduleOverflow_Basic (7.58s)
=== RUN   TestAccPagerDutySchedule_BasicWeek
--- PASS: TestAccPagerDutySchedule_BasicWeek (7.56s)
=== RUN   TestAccPagerDutySchedule_Multi
--- PASS: TestAccPagerDutySchedule_Multi (9.22s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	48.751s

Copy link
Collaborator

@heimweh heimweh left a comment

Choose a reason for hiding this comment

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

Nice work @stmcallister 👌 🙂

@stmcallister stmcallister merged commit 348562f into PagerDuty:master Apr 6, 2021
@stmcallister stmcallister deleted the suppress-schedule-start-diff 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.

2 participants