mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-06 08:06:50 +00:00
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:
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)
|
||||
|
||||
Reference in new issue
Block a user