MCPcopy Index your code
hub / github.com/coder/coder / safeOptions

Method safeOptions

coderd/exp_chats_test.go:10108–10113  ·  view source on GitHub ↗

safeOptions returns an explicit time window around the fixture messages to avoid app-time/database-time boundary flakes in summary tests.

()

Source from the content-addressed store, hash-verified

10106// safeOptions returns an explicit time window around the fixture messages to
10107// avoid app-time/database-time boundary flakes in summary tests.
10108func (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
10115func seedChatCostFixture(t *testing.T) chatCostTestFixture {
10116 t.Helper()

Callers 2

TestChatCostSummaryFunction · 0.80

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected