updated backend unit test gulp tasks
This commit is contained in:
parent
bfaf9b1ed4
commit
25d8e06c1d
19
gulpfile.js
19
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,
|
||||
|
|
Loading…
Reference in New Issue