Make sure that uses exit_code from firstTestNode
This commit is contained in:
Родитель
3b971eb1fb
Коммит
2c7efc008d
|
@ -33,7 +33,7 @@ function stream (url) {
|
|||
|
||||
function * display (pipeline, number, { heroku }) {
|
||||
let testRun = yield api.testRun(heroku, pipeline.id, number)
|
||||
const testNodes = yield api.testNodes(heroku, testRun.id)
|
||||
let testNodes = yield api.testNodes(heroku, testRun.id)
|
||||
let firstTestNode = testNodes[0]
|
||||
|
||||
testRun = yield waitForStates(TestRunStatesUtil.BUILDING_STATES, testRun, { heroku })
|
||||
|
@ -46,10 +46,15 @@ function * display (pipeline, number, { heroku }) {
|
|||
|
||||
testRun = yield waitForStates(TestRunStatesUtil.TERMINAL_STATES, testRun, { heroku })
|
||||
|
||||
// At this point, we know that testRun has a finished status,
|
||||
// and we can check for exit_code from firstTestNode
|
||||
testNodes = yield api.testNodes(heroku, testRun.id)
|
||||
firstTestNode = testNodes[0]
|
||||
|
||||
cli.log(/* newline 💃 */)
|
||||
cli.log(RenderTestRuns.printLine(testRun))
|
||||
|
||||
return testRun
|
||||
return firstTestNode
|
||||
}
|
||||
|
||||
function * displayAndExit (pipeline, number, { heroku }) {
|
||||
|
|
|
@ -34,7 +34,8 @@ describe('heroku ci:last', function () {
|
|||
testNode = {
|
||||
output_stream_url: 'https://output.com/tests',
|
||||
setup_stream_url: 'https://output.com/setup',
|
||||
test_run: { id: testRun.id }
|
||||
test_run: { id: testRun.id },
|
||||
exit_code: 1
|
||||
}
|
||||
|
||||
setupOutput = ''
|
||||
|
@ -55,6 +56,8 @@ describe('heroku ci:last', function () {
|
|||
.reply(200, testRun)
|
||||
.get(`/test-runs/${testRun.id}/test-nodes`)
|
||||
.reply(200, [testNode])
|
||||
.get(`/test-runs/${testRun.id}/test-nodes`)
|
||||
.reply(200, [testNode])
|
||||
|
||||
const streamAPI = nock('https://output.com')
|
||||
.get('/setup')
|
||||
|
|
Загрузка…
Ссылка в новой задаче