Skip to content

Conversation

@berler
Copy link

@berler berler commented Nov 19, 2025

Previously the tests would fail depending on the local time zone and the time of day the test was being run (even if you set the machine to UTC it would fail if run within an hour of midnight; similarly the tests would fail any time the date component of the local time and UTC was different as the schedule would not match on the right day). Changes the tests to pass in a consistent specific time for now so that the tests no longer have different behavior based on when (or where) they are run.

Previously the tests would fail depending on the local time zone and the
time of day the test was being run.
@zalando-robot
Copy link

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.


func TestGetSwitchoverSchedule(t *testing.T) {
now := time.Now()
now, _ := time.Parse(time.RFC3339, "2025-11-11T12:35:00Z")
Copy link
Author

Choose a reason for hiding this comment

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

note that you can reproduce the test failures I had when running locally by passing in some other times here like

  • 2025-11-11T20:35:00-08:00
  • 2025-11-11T23:35:00Z

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