Skip to content

Commit

Permalink
Add a few more timezone test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ridley <benridley29@gmail.com>
  • Loading branch information
benridley committed Dec 22, 2021
1 parent 4f332e0 commit 331a818
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion notify/notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,11 +775,20 @@ func TestTimeMuteStage(t *testing.T) {
shouldMute: true,
},
{
// Ensure comparisons with other time zones work as expected.
fireTime: "14 Nov 21 21:30 +0000",
labels: model.LabelSet{"mute": "utc"},
shouldMute: true,
},
{
fireTime: "15 Nov 22 14:30 +0900",
labels: model.LabelSet{"kst": "dont_mute"},
shouldMute: false,
},
{
fireTime: "15 Nov 21 02:00 -0500",
labels: model.LabelSet{"mute": "0500"},
shouldMute: true,
},
}
var intervals []timeinterval.TimeInterval
err := yaml.Unmarshal([]byte(muteIn), &intervals)
Expand Down

0 comments on commit 331a818

Please sign in to comment.