aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/initializers/installer.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/server/initializers/installer.js b/server/initializers/installer.js
index 53b07903c..059fcd8d8 100644
--- a/server/initializers/installer.js
+++ b/server/initializers/installer.js
@@ -81,7 +81,18 @@ function createOAuthUserIfNotExist (callback) {
81 logger.info('Creating the administrator.') 81 logger.info('Creating the administrator.')
82 82
83 const username = 'root' 83 const username = 'root'
84 const password = passwordGenerator(8, true) 84 let password = ''
85
86 // Do not generate a random password for tests
87 if (process.env.NODE_ENV === 'test') {
88 password = 'test'
89
90 if (process.env.NODE_APP_INSTANCE) {
91 password += process.env.NODE_APP_INSTANCE
92 }
93 } else {
94 password = passwordGenerator(8, true)
95 }
85 96
86 Users.createUser(username, password, function (err) { 97 Users.createUser(username, password, function (err) {
87 if (err) return callback(err) 98 if (err) return callback(err)