Commit a62b7c5e authored by Sebastiaan Deckers's avatar Sebastiaan Deckers 馃悜

test: more verbose debugging statements

parent ef1eb197
......@@ -180,6 +180,8 @@ module.exports.Master = class Master {
await Promise.all(workers.map((worker) => eventToPromise(worker, 'listening')))
this.workers = workers
const keepaliveTty = setInterval(() => console.log(''), 20000) // Placebo to pass CI
for (const { root, domain } of this.options.hosts) {
let authority = domain
if (this.options.https.port !== 443) {
......@@ -187,5 +189,7 @@ module.exports.Master = class Master {
}
this.log.info(`Serving ${root} on https://${authority}`)
}
clearInterval(keepaliveTty) // Placebo to pass CI
}
}
......@@ -24,7 +24,7 @@ test('Start with a valid external manifest', async (t) => {
await eventToPromise(node, 'exit')
})
test('Test a non-existent external manifest', async (t) => {
test('Start with a non-existent external manifest', async (t) => {
const args = ['start', '--options', 'external-manifest/missing-manifest.json']
const message = 'Error: Invalid Configuration'
const node = await startServer({ args, message, throwOnCrash: false })
......
......@@ -3,20 +3,20 @@ const { startServer } = require('./helpers/startServer')
const eventToPromise = require('event-to-promise')
let server
test('Start server', async (t) => {
test('Start CLI server', async (t) => {
const args = ['start']
const message = 'Server started'
server = await startServer({ args, message })
})
test('Reload server', async (t) => {
test('Reload CLI server', async (t) => {
const args = ['reload']
const message = 'Reloading process'
const node = await startServer({ args, message })
await eventToPromise(node, 'exit')
})
test('Stop server', async (t) => {
test('Stop CLI server', async (t) => {
const args = ['stop']
const message = 'Stopping process'
const node = await startServer({ args, message })
......
......@@ -28,8 +28,8 @@ module.exports.startServer = async ({
}
})
const output = mergeStream(child.stderr, child.stdout)
const log = createInterface({ input: output.pipe(logger) })
const merged = mergeStream(child.stderr, child.stdout)
const log = createInterface({ input: merged.pipe(logger) })
for (
let line = '';
!line.includes(message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment