Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/cmds/tasks_cmds/create-foundation-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ exports.builder = yargs => {
choices: ['all', 'variant', 'cnv', 'fnv'],
type: 'string',
demandOption: false
}).option('use-existing-sequence', {
describe: 'Attempt to add indexed values to existing sequence.',
}).option('re-ingest-file', {
describe: 'Force a re-ingestion of a file that has already been ingested.',
type: 'Boolean',
default: false,
demandOption: false
Expand All @@ -61,7 +61,7 @@ exports.handler = async argv => {
indexedDate: argv.indexedDate,
performerId: argv.performerId,
indexType: argv.indexType,
useExistingSequence: argv.useExistingSequence
reIngestFile: argv.reIngestFile
});
print(response.data, argv);
};
6 changes: 3 additions & 3 deletions lib/cmds/tasks_cmds/create-nantomics-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ exports.builder = yargs => {
alias: 'u',
demandOption: false,
type: 'string'
}).option('use-existing-sequence', {
describe: 'Attempt to add indexed values to existing sequence.',
}).option('re-ingest-file', {
describe: 'Force a re-ingestion of a file that has already been ingested.',
type: 'Boolean',
default: false,
demandOption: false
Expand All @@ -69,7 +69,7 @@ exports.handler = async argv => {
indexedDate: argv.indexedDate,
performerId: argv.performerId,
uploadType: argv.uploadType,
useExistingSequence: argv.useExistingSequence
reIngestFile: argv.reIngestFile
});
print(response.data, argv);
};
16 changes: 8 additions & 8 deletions test/unit/commands/task.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ test.serial.cb('The "create-foundation-xml-import" command should create a found
performerId: 'performer1',
indexedDate: '1999-01-01 12:00',
indexType: 'all',
useExistingSequence: false
reIngestFile: false
});
t.is(printSpy.callCount, 1);
t.is(printSpy.getCall(0).args[0], res.data);
Expand All @@ -112,7 +112,7 @@ test.serial.cb('The "create-foundation-xml-import" command should create a found
.parse('create-foundation-xml-import db3e09e9-1ecd-4976-aa5e-70ac7ada0cc3 -x c8ef7300-1373-4e51-8eb9-ff333600f6a5 -r 1234 -s 2a6dc73e-ed30-4387-94c1-0cd661da56d9 -n test3 --test-type test1 --performer-id performer1 --indexed-date "1999-01-01 12:00" --index-type all');
});

test.serial.cb('The "create-foundation-xml-import" accepts use-existing-sequence as an optional boolean flag', t => {
test.serial.cb('The "create-foundation-xml-import" accepts re-ingest-file as an optional boolean flag', t => {
const res = { data: {} };
postStub.onFirstCall().returns(res);
callback = () => {
Expand All @@ -128,15 +128,15 @@ test.serial.cb('The "create-foundation-xml-import" accepts use-existing-sequence
performerId: 'performer1',
indexedDate: '1999-01-01 12:00',
indexType: 'all',
useExistingSequence: true
reIngestFile: true
});
t.is(printSpy.callCount, 1);
t.is(printSpy.getCall(0).args[0], res.data);
t.end();
};

yargs.command(createFoundationTask)
.parse('create-foundation-xml-import db3e09e9-1ecd-4976-aa5e-70ac7ada0cc3 -x c8ef7300-1373-4e51-8eb9-ff333600f6a5 -r 1234 -s 2a6dc73e-ed30-4387-94c1-0cd661da56d9 -n test3 --test-type test1 --performer-id performer1 --indexed-date "1999-01-01 12:00" --index-type all --use-existing-sequence');
.parse('create-foundation-xml-import db3e09e9-1ecd-4976-aa5e-70ac7ada0cc3 -x c8ef7300-1373-4e51-8eb9-ff333600f6a5 -r 1234 -s 2a6dc73e-ed30-4387-94c1-0cd661da56d9 -n test3 --test-type test1 --performer-id performer1 --indexed-date "1999-01-01 12:00" --index-type all --re-ingest-file');
});

test.serial.cb('The "create-nantomics-vcf-import" command should create a Nantomics ingest task', t => {
Expand All @@ -156,7 +156,7 @@ test.serial.cb('The "create-nantomics-vcf-import" command should create a Nantom
performerId: 'performer1',
indexedDate: '1999-01-01 12:00',
uploadType: 'variant',
useExistingSequence: false
reIngestFile: false
});
t.is(printSpy.callCount, 1);
t.is(printSpy.getCall(0).args[0], res.data);
Expand All @@ -167,7 +167,7 @@ test.serial.cb('The "create-nantomics-vcf-import" command should create a Nantom
.parse('create-nantomics-vcf-import db3e09e9-1ecd-4976-aa5e-70ac7ada0cc3 -v c8ef7300-1373-4e51-8eb9-ff333600f6a5 -p converted -s 2a6dc73e-ed30-4387-94c1-0cd661da56d9 -e germline -n test4 --test-type test1 --performer-id performer1 --indexed-date "1999-01-01 12:00" --upload-type variant');
});

test.serial.cb('The "create-nantomics-vcf-import" command accepts use-existing-sequence as an optional boolean flag', t => {
test.serial.cb('The "create-nantomics-vcf-import" command accepts re-ingest-file as an optional boolean flag', t => {
const res = { data: {} };
postStub.onFirstCall().returns(res);
callback = () => {
Expand All @@ -184,15 +184,15 @@ test.serial.cb('The "create-nantomics-vcf-import" command accepts use-existing-s
performerId: 'performer1',
indexedDate: '1999-01-01 12:00',
uploadType: 'variant',
useExistingSequence: true
reIngestFile: true
});
t.is(printSpy.callCount, 1);
t.is(printSpy.getCall(0).args[0], res.data);
t.end();
};

yargs.command(createNantomicsTask)
.parse('create-nantomics-vcf-import db3e09e9-1ecd-4976-aa5e-70ac7ada0cc3 -v c8ef7300-1373-4e51-8eb9-ff333600f6a5 -p converted -s 2a6dc73e-ed30-4387-94c1-0cd661da56d9 -e germline -n test4 --test-type test1 --performer-id performer1 --indexed-date "1999-01-01 12:00" --upload-type variant --use-existing-sequence');
.parse('create-nantomics-vcf-import db3e09e9-1ecd-4976-aa5e-70ac7ada0cc3 -v c8ef7300-1373-4e51-8eb9-ff333600f6a5 -p converted -s 2a6dc73e-ed30-4387-94c1-0cd661da56d9 -e germline -n test4 --test-type test1 --performer-id performer1 --indexed-date "1999-01-01 12:00" --upload-type variant --re-ingest-file');
});

test.serial.cb('The "tasks-cancel" command should cancel a task', t => {
Expand Down