File tree Expand file tree Collapse file tree 2 files changed +0
-56
lines changed
web/src/app/api/v1/agent-runs Expand file tree Collapse file tree 2 files changed +0
-56
lines changed Original file line number Diff line number Diff line change @@ -236,31 +236,6 @@ describe('agentRunsStepsPost', () => {
236236 expect ( json . error ) . toBe ( 'Unauthorized to add steps to this run' )
237237 } )
238238
239- test ( 'returns test step ID for test user' , async ( ) => {
240- const req = new NextRequest (
241- 'http://localhost/api/v1/agent-runs/run-123/steps' ,
242- {
243- method : 'POST' ,
244- headers : { Authorization : 'Bearer test-key' } ,
245- body : JSON . stringify ( { stepNumber : 1 } ) ,
246- } ,
247- )
248-
249- const response = await postAgentRunsSteps ( {
250- req,
251- runId : 'run-123' ,
252- getUserInfoFromApiKey : mockGetUserInfoFromApiKey ,
253- logger : mockLogger ,
254- loggerWithContext : mockLoggerWithContext ,
255- trackEvent : mockTrackEvent ,
256- db : mockDb ,
257- } )
258-
259- expect ( response . status ) . toBe ( 200 )
260- const json = await response . json ( )
261- expect ( json . stepId ) . toBe ( 'test-step-id' )
262- } )
263-
264239 test ( 'successfully adds agent step' , async ( ) => {
265240 const req = new NextRequest (
266241 'http://localhost/api/v1/agent-runs/run-123/steps' ,
Original file line number Diff line number Diff line change @@ -743,35 +743,4 @@ describe('/api/v1/agent-runs POST endpoint', () => {
743743 } )
744744 } )
745745 } )
746-
747- describe ( 'Test user handling' , ( ) => {
748- test ( 'skips database update for test user on FINISH action' , async ( ) => {
749- const req = new NextRequest ( 'http://localhost:3000/api/v1/agent-runs' , {
750- method : 'POST' ,
751- headers : { Authorization : 'Bearer test-api-key-test' } ,
752- body : JSON . stringify ( {
753- action : 'FINISH' ,
754- runId : 'run-test' ,
755- status : 'completed' ,
756- totalSteps : 5 ,
757- directCredits : 100 ,
758- totalCredits : 150 ,
759- } ) ,
760- } )
761-
762- const response = await postAgentRuns ( {
763- req,
764- getUserInfoFromApiKey : mockGetUserInfoFromApiKey ,
765- logger : mockLogger ,
766- loggerWithContext : mockLoggerWithContext ,
767- trackEvent : mockTrackEvent ,
768- db : mockDb ,
769- } )
770-
771- expect ( response . status ) . toBe ( 200 )
772- const body = await response . json ( )
773- expect ( body ) . toEqual ( { success : true } )
774- expect ( mockDb . update ) . not . toHaveBeenCalled ( )
775- } )
776- } )
777746} )
You can’t perform that action at this time.
0 commit comments