@@ -356,6 +356,9 @@ describe('sendEmail', () => {
356356 it ( 'should send an email successfully' , async ( ) => {
357357 // protected data setup
358358 process . env . IEXEC_DATASET_FILENAME = 'data.zip' ;
359+ const requesterSecret = JSON . parse (
360+ process . env . IEXEC_REQUESTER_SECRET_1
361+ ) ;
359362
360363 await expect ( start ( ) ) . resolves . toBeUndefined ( ) ;
361364
@@ -372,11 +375,17 @@ describe('sendEmail', () => {
372375 message : 'Your email has been sent successfully.' ,
373376 status : 200 ,
374377 } ) ;
375- expect ( JSON . parse ( computedJson ) ) . toStrictEqual ( {
376- 'callback-data' :
377- '0x0000000000000000000000000000000000000000000000000000000000000001' ,
378- 'deterministic-output-path' : `${ IEXEC_OUT } /result.txt` ,
379- } ) ;
378+ if ( requesterSecret . useCallback ) {
379+ expect ( JSON . parse ( computedJson ) ) . toStrictEqual ( {
380+ 'callback-data' :
381+ '0x0000000000000000000000000000000000000000000000000000000000000001' ,
382+ 'deterministic-output-path' : `${ IEXEC_OUT } /result.txt` ,
383+ } ) ;
384+ } else {
385+ expect ( JSON . parse ( computedJson ) ) . toStrictEqual ( {
386+ 'deterministic-output-path' : `${ IEXEC_OUT } /result.txt` ,
387+ } ) ;
388+ }
380389 // output should not contain extra files
381390 const out = await fsPromises . readdir ( IEXEC_OUT ) ;
382391 expect ( out . length ) . toBe ( 2 ) ;
0 commit comments