From 463d7df582362c810bb7b33495747f3d5ad1a0dc Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Sun, 9 Jan 2022 11:51:15 -0800 Subject: [PATCH] fix(tests): Skipping IPFS stuff in test environment --- bin/server.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/server.js b/bin/server.js index 3abb53a..d235a15 100644 --- a/bin/server.js +++ b/bin/server.js @@ -91,8 +91,11 @@ class Server { const success = await this.adminLib.createSystemUser() if (success) console.log('System admin user created.') - // Attach the other IPFS controllers - await controllers.attachControllers(app) + // Attach the other IPFS controllers. + // Skip if this is a test environment. + if (config.env !== 'test') { + await controllers.attachControllers(app) + } // ipfs-coord has a memory leak. This app shuts down after 4 hours. It // expects to be run by Docker or pm2, which can automatically restart