]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/utils/servers.js
Server: fix single pod tests
[github/Chocobozzz/PeerTube.git] / server / tests / utils / servers.js
index d62838bc71529eb468bb8e54a76530b4a7142b5f..1946ef49a6304a5399f4845dfd3de7aaf522a69f 100644 (file)
@@ -34,7 +34,7 @@ function flushAndRunMultipleServers (totalServers, serversRun) {
         runServer(j, function (app, url) {
           anotherServerDone(j, app, url)
         })
-      }, 1000 * j)
+      }, 1000 * (j - 1))
     }
   })
 }
@@ -47,6 +47,7 @@ function runServer (number, callback) {
   const server = {
     app: null,
     url: `http://localhost:${9000 + number}`,
+    host: `localhost:${9000 + number}`,
     client: {
       id: null,
       secret: null
@@ -59,12 +60,12 @@ function runServer (number, callback) {
 
   // These actions are async so we need to be sure that they have both been done
   const serverRunString = {
-    'Connected to mongodb': false,
+    'Database is ready': false,
     'Server listening on port': false
   }
 
   const regexps = {
-    client_id: 'Client id: ([a-f0-9]+)',
+    client_id: 'Client id: (.+)',
     client_secret: 'Client secret: (.+)',
     user_username: 'Username: (.+)',
     user_password: 'User password: (.+)'
@@ -102,7 +103,7 @@ function runServer (number, callback) {
       if (serverRunString[key] === false) dontContinue = true
     }
 
-    // If no, there is maybe one thing not already initialized (mongodb...)
+    // If no, there is maybe one thing not already initialized (client/user credentials generation...)
     if (dontContinue === true) return
 
     server.app.stdout.removeListener('data', onStdout)