Use constants.TEST

This commit is contained in:
Girish Ramakrishnan
2023-10-01 13:52:19 +05:30
parent 0e195679bf
commit ceb908bee7
20 changed files with 26 additions and 23 deletions
+2 -2
View File
@@ -130,7 +130,7 @@ async function onInfraReady(infraChanged) {
async function startInfra(restoreOptions) {
assert.strictEqual(typeof restoreOptions, 'object');
if (process.env.BOX_ENV === 'test' && !process.env.TEST_CREATE_INFRA) return;
if (constants.TEST && !process.env.TEST_CREATE_INFRA) return;
debug('startInfra: checking infrastructure');
@@ -228,7 +228,7 @@ async function onActivated(restoreOptions) {
// disable responding to api calls via IP to not leak domain info. this is carefully placed as the last item, so it buys
// the UI some time to query the dashboard domain in the restore code path
await timers.setTimeout(30000);
if (!constants.TEST) await timers.setTimeout(30000);
await reverseProxy.writeDefaultConfig({ activated :true });
}