mirror of
https://github.com/logos-storage/codex-factory.git
synced 2026-01-05 22:43:09 +00:00
test: debugging failed tests
This commit is contained in:
parent
221587b0e4
commit
ca6aaa2687
1
.github/workflows/release_please.yaml
vendored
1
.github/workflows/release_please.yaml
vendored
@ -9,6 +9,7 @@ permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
id-token: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Codex } from '@codex-storage/sdk-js'
|
||||
import { runCommand } from '@oclif/test'
|
||||
import { runCommand as runCommandRaw } from '@oclif/test'
|
||||
import { use as chaiUse, expect } from 'chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import Dockerode from 'dockerode'
|
||||
@ -12,6 +12,17 @@ import { deleteNetwork, findContainer } from '../utils/docker'
|
||||
chaiUse(chaiAsPromised)
|
||||
let testFailed = false
|
||||
|
||||
async function runCommand(args: string): Promise<ReturnType<typeof runCommandRaw>> {
|
||||
const result = await runCommandRaw(args)
|
||||
|
||||
if (result.error) {
|
||||
console.log(result.stdout)
|
||||
console.error(result.stderr)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
function wrapper (fn: () => Promise<unknown>): () => Promise<unknown> {
|
||||
return async () => {
|
||||
try {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { runCommand } from '@oclif/test'
|
||||
import { runCommand as runCommandRaw } from '@oclif/test'
|
||||
import { use as chaiUse, expect } from 'chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import Dockerode from 'dockerode'
|
||||
@ -9,6 +9,17 @@ import { deleteNetwork, findContainer } from '../utils/docker'
|
||||
|
||||
chaiUse(chaiAsPromised)
|
||||
|
||||
async function runCommand(args: string): Promise<ReturnType<typeof runCommandRaw>> {
|
||||
const result = await runCommandRaw(args)
|
||||
|
||||
if (result.error) {
|
||||
console.log(result.stdout)
|
||||
console.error(result.stderr)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
describe('stop command', () => {
|
||||
let docker: Dockerode
|
||||
const envPrefix = `codex-factory-test-${randomBytes(4).toString('hex')}`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user