Created
June 1, 2015 21:30
-
-
Save gregarndt/129014ab4c08ac09bdea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import assert from 'assert'; | |
import DockerWorker from '../dockerworker'; | |
import TestWorker from '../testworker'; | |
let worker; | |
suite('use dind-service', () => { | |
setup(async () => { | |
worker = new TestWorker(DockerWorker); | |
await worker.launch(); | |
}); | |
teardown(async () => { | |
if (worker) { | |
await worker.terminate(); | |
worker = null; | |
} | |
}); | |
test('run docker in docker', async () => { | |
let result = await worker.postToQueue({ | |
payload: { | |
image: 'jonasfj/dind-test:v1', | |
command: [''], | |
features: { | |
bufferLog: true, | |
azureLiveLog: false, | |
dind: true | |
}, | |
maxRunTime: 5 * 60 | |
} | |
}); | |
assert.equal(result.run.state, 'completed', 'task should be successfull'); | |
assert.equal(result.run.reasonResolved, 'completed', 'task should be successfull'); | |
assert.ok(result.log.indexOf('BusyBox is a multi-call binary') !== -1, | |
'Expected to see busybox --help message'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment