From 88304d45db42db238ec442c0455645427bc8ac7f Mon Sep 17 00:00:00 2001 From: sylvain-morin Date: Wed, 4 Oct 2023 17:09:03 +0200 Subject: [PATCH] Run specs with docker compose - add tests related to user email/IP --- test/hooks.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/hooks.js b/test/hooks.js index 46ff92b9..039c6392 100644 --- a/test/hooks.js +++ b/test/hooks.js @@ -29,6 +29,12 @@ function initializeDb() { exports.mochaGlobalSetup = async function () { expect( process.env.NODE_ENV ).to.eq( "test" ); + console.log( "\n\nINITIALIZING TEST ENVIRONMENT\n\n" ); + + if ( !process.env.DB_ALREADY_INITIALIZED ) { + initializeDb( ); + } + // Wait for Postgres console.log( "Waiting for Postgres..." ); await testHelper.waitForPG( 100 ); @@ -37,12 +43,6 @@ exports.mochaGlobalSetup = async function () { console.log( "Waiting for ElasticSearch..." ); await testHelper.waitForES( 100 ); - console.log( "\n\nINITIALIZING TEST ENVIRONMENT\n\n" ); - - if ( !process.env.DB_ALREADY_INITIALIZED ) { - initializeDb( ); - } - console.log( "Creating ES indices" ); await testHelper.createIndices( ); console.log( "Loading ES fixtures" );