Skip to content

Commit 0caaa47

Browse files
committed
Export test.MockStartTime var
1 parent 6143e70 commit 0caaa47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/utils.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ import (
1717
"github.com/stretchr/testify/require"
1818
)
1919

20+
// MockStartTime is the start time used by MockUniverse
21+
var MockStartTime = time.Date(2025, 5, 4, 12, 30, 45, 123456789, time.UTC)
22+
2023
// MockUniverse mocks time and random generators for testing
2124
func MockUniverse() func() {
22-
now := dates.NewSequentialNow(time.Date(2025, 5, 4, 12, 30, 45, 123456789, time.UTC), time.Second)
25+
now := dates.NewSequentialNow(MockStartTime, time.Second)
2326

2427
dates.SetNowFunc(now)
2528
uuids.SetGenerator(uuids.NewSeededGenerator(123456, now))

0 commit comments

Comments
 (0)