1
0
forked from boos/BoosAPI

test: align proxy route db mocks with client columns

This commit is contained in:
cita
2026-03-20 12:49:09 +08:00
parent 4e60290838
commit 8291b9c59f
9 changed files with 23 additions and 0 deletions
@@ -64,6 +64,8 @@ vi.mock('../../db/index.js', () => ({
db: { db: {
insert: (arg: any) => dbInsertMock(arg), insert: (arg: any) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false, hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
@@ -68,6 +68,8 @@ vi.mock('../../db/index.js', () => ({
db: { db: {
insert: (arg: any) => dbInsertMock(arg), insert: (arg: any) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false, hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
@@ -68,6 +68,9 @@ vi.mock('../../db/index.js', () => ({
db: { db: {
insert: (arg: any) => dbInsertMock(arg), insert: (arg: any) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
}, },
+3
View File
@@ -74,6 +74,9 @@ vi.mock('../../db/index.js', () => ({
select: (..._args: unknown[]) => createDbSelectChain(), select: (..._args: unknown[]) => createDbSelectChain(),
insert: (arg: unknown) => dbInsertMock(arg), insert: (arg: unknown) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
modelAvailability: { modelAvailability: {
@@ -58,6 +58,9 @@ vi.mock('../../db/index.js', () => ({
db: { db: {
insert: (arg: any) => dbInsertMock(arg), insert: (arg: any) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
}, },
@@ -80,6 +80,8 @@ vi.mock('../../db/index.js', () => ({
db: { db: {
insert: (arg: any) => dbInsertMock(arg), insert: (arg: any) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false, hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
@@ -67,6 +67,9 @@ vi.mock('../../db/index.js', () => ({
db: { db: {
insert: (arg: any) => dbInsertMock(arg), insert: (arg: any) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
}, },
@@ -73,6 +73,8 @@ vi.mock('../../db/index.js', () => ({
db: { db: {
insert: (arg: any) => dbInsertMock(arg), insert: (arg: any) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false, hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
+3
View File
@@ -54,6 +54,9 @@ vi.mock('../../db/index.js', () => ({
db: { db: {
insert: (arg: any) => dbInsertMock(arg), insert: (arg: any) => dbInsertMock(arg),
}, },
hasProxyLogBillingDetailsColumn: async () => false,
hasProxyLogClientColumns: async () => false,
hasProxyLogDownstreamApiKeyIdColumn: async () => false,
schema: { schema: {
proxyLogs: {}, proxyLogs: {},
}, },