Skip to content

Commit

Permalink
Fixup test.
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Feb 16, 2024
1 parent 39e5b1e commit 6c7f285
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/objects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ func TestRenewalInfoSuggestedWindowIsWithin(t *testing.T) {
// Exactly the middle.
test.Assert(t, window.IsWithin(now.Add(time.Minute*30)), "Middle of window should be within the window")

// Exactly the end, inclusive of the last nanosecond.
// Exactly the end time.
test.Assert(t, !window.IsWithin(now.Add(time.Hour)), "End of window should be outside the window")

// Exactly the end of the window.
test.Assert(t, window.IsWithin(now.Add(time.Hour-time.Nanosecond)), "Should be just inside the window")

// Just before the first nanosecond.
test.Assert(t, !window.IsWithin(now.Add(-time.Nanosecond)), "Before the window should not be within the window")

// Just after the last nanosecond.
test.Assert(t, !window.IsWithin(now.Add(time.Hour+time.Nanosecond)), "After the window should not be within the window")
}

0 comments on commit 6c7f285

Please sign in to comment.