Merged
Conversation
Previously the tests would fail depending on the local time zone and the time of day the test was being run.
|
Cannot start a pipeline due to: Click on pipeline status check Details link below for more information. |
berler
commented
Nov 19, 2025
|
|
||
| func TestGetSwitchoverSchedule(t *testing.T) { | ||
| now := time.Now() | ||
| now, _ := time.Parse(time.RFC3339, "2025-11-11T12:35:00Z") |
Contributor
Author
There was a problem hiding this comment.
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
Member
There was a problem hiding this comment.
jup, could reproduce. Thanks for the pointer
mikkeloscar
reviewed
Dec 8, 2025
Member
|
@berler can you reflect Mikkel's comment. Then we can merge the PR. Edit: Committed the suggestions myself via Gh. |
FxKu
reviewed
Dec 10, 2025
FxKu
reviewed
Dec 10, 2025
Co-authored-by: Mikkel Oscar Lyderik Larsen <[email protected]>
Member
|
👍 |
1 similar comment
Member
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
nowso that the tests no longer have different behavior based on when (or where) they are run.