diff --git a/packages/ingest/package.json b/packages/ingest/package.json index 02a9c8de62e..3e5520fb0fa 100644 --- a/packages/ingest/package.json +++ b/packages/ingest/package.json @@ -43,7 +43,7 @@ "encodeurl": "^1.0.2", "fs-extra": "^5.0.0", "got": "^9.2.1", - "jsftp": "^2.0.0", + "jsftp": "https://github.com/yjpa7145/jsftp.git#Fix-partial-file-issue", "json-loader": "~0.5.7", "lodash.clonedeep": "^4.5.0", "lodash.get": "^4.4.2", diff --git a/tasks/parse-pdr/tests/parse_pdrs_test.js b/tasks/parse-pdr/tests/parse_pdrs_test.js index cdf77e870d4..4ac0f0aa2e4 100644 --- a/tasks/parse-pdr/tests/parse_pdrs_test.js +++ b/tasks/parse-pdr/tests/parse_pdrs_test.js @@ -291,24 +291,16 @@ test.serial('Parse a PDR without a granuleIdFilter in the config', async (t) => await validateInput(t, t.context.payload.input); await validateConfig(t, t.context.payload.config); - let output; - try { - output = await parsePdr(t.context.payload); + const output = await parsePdr(t.context.payload); - await validateOutput(t, output); + await validateOutput(t, output); + + t.deepEqual(output.pdr, t.context.payload.input.pdr); + t.is(output.granules.length, 2); + t.is(output.granulesCount, 2); + t.is(output.filesCount, 2); + t.is(output.totalSize, 3952643); - t.deepEqual(output.pdr, t.context.payload.input.pdr); - t.is(output.granules.length, 2); - t.is(output.granulesCount, 2); - t.is(output.filesCount, 2); - t.is(output.totalSize, 3952643); - } - catch (err) { - if (err instanceof errors.RemoteResourceError || err.code === 'AllAccessDisabled') { - t.pass('ignoring this test. Test server seems to be down'); - } - else t.fail(err); - } }); test.serial('Empty FILE_ID valule in PDR, parse-pdr throws error', async (t) => { @@ -403,22 +395,13 @@ test.serial('Parse a PDR with a granuleIdFilter in the config', async (t) => { await validateInput(t, t.context.payload.input); await validateConfig(t, t.context.payload.config); - let output; - try { - output = await parsePdr(t.context.payload); + const output = await parsePdr(t.context.payload); - await validateOutput(t, output); + await validateOutput(t, output); - t.deepEqual(output.pdr, t.context.payload.input.pdr); - t.is(output.granules.length, 1); - t.is(output.granulesCount, 1); - t.is(output.filesCount, 1); - t.is(output.totalSize, 1503297); - } - catch (err) { - if (err instanceof errors.RemoteResourceError || err.code === 'AllAccessDisabled') { - t.pass('ignoring this test. Test server seems to be down'); - } - else t.fail(err); - } + t.deepEqual(output.pdr, t.context.payload.input.pdr); + t.is(output.granules.length, 1); + t.is(output.granulesCount, 1); + t.is(output.filesCount, 1); + t.is(output.totalSize, 1503297); });