@@ -15,7 +15,7 @@ import {
1515 workspace ,
1616} from '@sim/db/schema'
1717import { generateId } from '@sim/utils/id'
18- import { eq , inArray } from 'drizzle-orm'
18+ import { eq , inArray , sql } from 'drizzle-orm'
1919import { afterAll , beforeAll , beforeEach , describe , expect , it } from 'vitest'
2020import {
2121 createKnowledgeAclFixtureIds ,
@@ -289,6 +289,8 @@ describe('organization operational overview with real SQL', () => {
289289 connectorId : gmailId ,
290290 status : 'partial' ,
291291 membersIncomplete : 1 ,
292+ docsFailed : 0 ,
293+ processingDispatchFailed : 0 ,
292294 completedAt : new Date ( ) ,
293295 } )
294296 expect ( await provider ( 'gmail' ) ) . toMatchObject ( {
@@ -312,7 +314,7 @@ describe('organization operational overview with real SQL', () => {
312314 expect ( await provider ( 'gmail' ) ) . toMatchObject ( { status : 'needs_attention' } )
313315 await db
314316 . update ( knowledgeConnector )
315- . set ( { nextMemberSyncAt : new Date ( ) } )
317+ . set ( { nextMemberSyncAt : sql `statement_timestamp() - interval '1 second'` } )
316318 . where ( eq ( knowledgeConnector . id , gmailId ) )
317319 expect ( await provider ( 'gmail' ) ) . toMatchObject ( {
318320 status : 'active' ,
@@ -327,6 +329,8 @@ describe('organization operational overview with real SQL', () => {
327329 id : generateId ( ) ,
328330 connectorId : gmailId ,
329331 status : 'completed' ,
332+ docsFailed : 0 ,
333+ processingDispatchFailed : 0 ,
330334 startedAt : new Date ( Date . now ( ) + 1000 ) ,
331335 completedAt : new Date ( ) ,
332336 } )
0 commit comments