2022-02-11 13:59:10 +00:00
|
|
|
import fs from 'fs'
|
2022-02-14 08:15:50 +00:00
|
|
|
import { runner } from '../core/runner.mjs'
|
2022-02-11 13:59:10 +00:00
|
|
|
|
|
|
|
try {
|
|
|
|
fs.rmSync(util.getPathFromRoot('./db.json'))
|
|
|
|
} catch {}
|
|
|
|
|
2022-02-14 08:15:50 +00:00
|
|
|
runner(import.meta.url, {
|
|
|
|
name: 'test-runner',
|
|
|
|
testapp: {
|
|
|
|
port: 31313,
|
|
|
|
provider: 'git',
|
|
|
|
url: 'http://localhost:61412/releases',
|
|
|
|
updateEvery: 0.014,
|
|
|
|
heartbeatTimeout: 500,
|
|
|
|
heartbeatAttempts: 2,
|
|
|
|
heartbeatAttemptsWait: 250,
|
|
|
|
}
|
|
|
|
}, 'db.json')
|
2022-02-11 13:59:10 +00:00
|
|
|
.then(
|
2022-02-14 08:15:50 +00:00
|
|
|
function(core) {
|
|
|
|
core.log.info('core is running')
|
2022-02-11 13:59:10 +00:00
|
|
|
},
|
|
|
|
function(err) {
|
2022-02-14 08:15:50 +00:00
|
|
|
runner.log.error(err, 'Error starting runner')
|
2022-02-11 13:59:10 +00:00
|
|
|
process.exit(1)
|
2022-02-14 08:15:50 +00:00
|
|
|
}
|
|
|
|
)
|