diff --git a/gulpfile.js b/gulpfile.js index d69dd5d0d..b6427cdd1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -74,7 +74,7 @@ defaultTask.description = `Starts all application services`; // Backend tests -async function backTestOnly() { +async function backTestOnce() { let bootOptions; if (argv['random']) @@ -107,11 +107,19 @@ async function backTestOnly() { await app.disconnect(); } -backTestOnly.description = `Runs the backend tests only, can receive --junit arg to save reports on a xml file`; +backTestOnce.description = `Runs the backend tests once, can receive --junit arg to save reports on a xml file`; + +async function backTestDockerOnce() { + let containerId = await docker(); + await backTestOnce(); + if (argv['random']) + await execP(`docker rm -fv ${containerId}`); +} +backTestDockerOnce.description = `Runs backend tests using in site container once`; async function backTestDocker() { let containerId = await docker(); - await backTestOnly(); + await backTest(); if (argv['random']) await execP(`docker rm -fv ${containerId}`); } @@ -122,7 +130,7 @@ function backTest(done) { nodemon({ exec: ['node ./node_modules/gulp/bin/gulp.js'], - args: ['backTestOnly'], + args: ['backTestOnce'], watch: backSources, done: done }); @@ -484,8 +492,9 @@ module.exports = { back, backOnly, backWatch, + backTestOnce, + backTestDockerOnce, backTest, - backTestOnly, backTestDocker, e2e, e2eOnly,