Skip to content

Commit 265f67b

Browse files
committed
fix(test): update GetUsageStats callers in sqlite_test for new signature
GetUsageStats now requires (ctx, rangeStart, rangeEnd time.Time) since aad9e92 added time-range filtering. The sqlite test cases were missed, breaking CI on main. Pass zero-value times for the existing "today" semantics.
1 parent 6fb5211 commit 265f67b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

database/sqlite_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ func TestUsageStatsIncludeBillingTotals(t *testing.T) {
874874
}
875875
db.flushLogs()
876876

877-
stats, err := db.GetUsageStats(ctx)
877+
stats, err := db.GetUsageStats(ctx, time.Time{}, time.Time{})
878878
if err != nil {
879879
t.Fatalf("GetUsageStats 返回错误: %v", err)
880880
}
@@ -973,7 +973,7 @@ func TestUsageStatsIncludeCodex2APIBreakdowns(t *testing.T) {
973973
}
974974
db.flushLogs()
975975

976-
stats, err := db.GetUsageStats(ctx)
976+
stats, err := db.GetUsageStats(ctx, time.Time{}, time.Time{})
977977
if err != nil {
978978
t.Fatalf("GetUsageStats 返回错误: %v", err)
979979
}
@@ -1062,7 +1062,7 @@ func TestUsageStatsBaselinePreservesCacheRateAndFirstTokenAfterClear(t *testing.
10621062
t.Fatalf("ClearUsageLogs 返回错误: %v", err)
10631063
}
10641064

1065-
stats, err := db.GetUsageStats(ctx)
1065+
stats, err := db.GetUsageStats(ctx, time.Time{}, time.Time{})
10661066
if err != nil {
10671067
t.Fatalf("GetUsageStats 返回错误: %v", err)
10681068
}

0 commit comments

Comments
 (0)