mirror of
https://github.com/logos-storage/codex-factory.git
synced 2026-01-08 16:03:10 +00:00
test: output client logs on test failure
This commit is contained in:
parent
ca6aaa2687
commit
a29f09027d
@ -12,7 +12,7 @@ import { deleteNetwork, findContainer } from '../utils/docker'
|
|||||||
chaiUse(chaiAsPromised)
|
chaiUse(chaiAsPromised)
|
||||||
let testFailed = false
|
let testFailed = false
|
||||||
|
|
||||||
async function runCommand(args: string): Promise<ReturnType<typeof runCommandRaw>> {
|
async function runCommand (args: string): Promise<ReturnType<typeof runCommandRaw>> {
|
||||||
const result = await runCommandRaw(args)
|
const result = await runCommandRaw(args)
|
||||||
|
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
@ -72,7 +72,9 @@ describe('start command', () => {
|
|||||||
const containers = await docker.listContainers()
|
const containers = await docker.listContainers()
|
||||||
for (const c of containers) console.log(` - ${c.Names.join(', ')}`)
|
for (const c of containers) console.log(` - ${c.Names.join(', ')}`)
|
||||||
|
|
||||||
await runCommand('logs client')
|
const { stdout } = await runCommand('logs client')
|
||||||
|
console.log('Client logs:\n', stdout)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await runCommand('stop')
|
await runCommand('stop')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user