Merge pull request #8743 from r266-tech/codex/fix-peak-rate-usage-test

test(billing): make peak-rate usage tests independent of wall clock
This commit is contained in:
Wesley Liddick authored and GitHub committed 2026-11-16 16:32:11 +08:00
commit 6247d33eb6
2 files changed
+4

No files matched your search

@@ -362,6 +362,8 @@ func TestGatewayServiceRecordUsage_PeakRateAffectsTokenModeImageOutputTokens(t *
},
User: &User{ID: 602},
Account: &Account{ID: 702},
// The peak window excludes 23:59, so do not depend on the wall clock.
PricingAt: time.Date(2026, time.January, 15, 12, 0, 0, 0, time.UTC),
})
require.NoError(t, err)
@@ -476,6 +476,8 @@ func TestOpenAIGatewayServiceRecordUsage_PeakRateAffectsTokenModeImageOutputToke
},
User: &User{ID: 2004},
Account: &Account{ID: 3004},
// The peak window excludes 23:59, so do not depend on the wall clock.
PricingAt: time.Date(2026, time.January, 15, 12, 0, 0, 0, time.UTC),
})
require.NoError(t, err)