safeOptions returns an explicit time window around the fixture messages to avoid app-time/database-time boundary flakes in summary tests.
()
| 10106 | // safeOptions returns an explicit time window around the fixture messages to |
| 10107 | // avoid app-time/database-time boundary flakes in summary tests. |
| 10108 | func (f chatCostTestFixture) safeOptions() codersdk.ChatCostSummaryOptions { |
| 10109 | return codersdk.ChatCostSummaryOptions{ |
| 10110 | StartDate: f.EarliestCreatedAt.Add(-time.Minute), |
| 10111 | EndDate: f.LatestCreatedAt.Add(time.Minute), |
| 10112 | } |
| 10113 | } |
| 10114 | |
| 10115 | func seedChatCostFixture(t *testing.T) chatCostTestFixture { |
| 10116 | t.Helper() |
no test coverage detected