@@ -29,6 +29,7 @@ const createFoundationBam = proxyquire('../../../lib/cmds/genomics_cmds/ingestio
2929const createCarisBam = proxyquire ( '../../../lib/cmds/genomics_cmds/ingestions_cmds/create-caris-bam' , mocks ) ;
3030const createNextGen = proxyquire ( '../../../lib/cmds/genomics_cmds/ingestions_cmds/create-nextgen' , mocks ) ;
3131const getByGermlineCaseId = proxyquire ( '../../../lib/cmds/genomics_cmds/ingestions_cmds/get-by-germline-case-id' , mocks ) ;
32+ const createVcf = proxyquire ( '../../../lib/cmds/genomics_cmds/ingestions_cmds/create-vcf' , mocks ) ;
3233
3334test . always . afterEach ( t => {
3435 getStub . resetHistory ( ) ;
@@ -200,3 +201,28 @@ test.serial.cb('The "create-nextgen" command should create a NextGen ingestion',
200201
201202 yargs . command ( createNextGen ) . parse ( 'create-nextgen projectId tarFileId' ) ;
202203} ) ;
204+
205+ test . serial . cb ( 'The "create-vcf" command should create a VCF ingestion' , t => {
206+ const res = { data : { id : 'ingestionId' } } ;
207+ postStub . onFirstCall ( ) . returns ( res ) ;
208+ callback = ( ) => {
209+ t . is ( postStub . callCount , 1 ) ;
210+ t . is ( postStub . getCall ( 0 ) . args [ 1 ] , '/v1/genomic-ingestion/projects/projectId/ingestions' ) ;
211+ t . deepEqual ( postStub . getCall ( 0 ) . args [ 2 ] , {
212+ ingestionType : 'Vcf' ,
213+ inputFiles : {
214+ vcf : 'vcfFileId' ,
215+ manifest : 'manifestFileId'
216+ } ,
217+ notificationConfig : {
218+ succeededEmail : 'test@testing.com' ,
219+ failedEmail : 'test@testing.com'
220+ }
221+ } ) ;
222+ t . is ( printSpy . callCount , 1 ) ;
223+ t . true ( printSpy . calledWith ( { id : 'ingestionId' } ) ) ;
224+ t . end ( ) ;
225+ } ;
226+
227+ yargs . command ( createVcf ) . parse ( 'create-vcf projectId vcfFileId manifestFileId --succeededEmail test@testing.com --failedEmail test@testing.com' ) ;
228+ } ) ;
0 commit comments