Skip to content

Instantly share code, notes, and snippets.

@gregarndt
Created June 1, 2015 21:30
Show Gist options
  • Save gregarndt/129014ab4c08ac09bdea to your computer and use it in GitHub Desktop.
Save gregarndt/129014ab4c08ac09bdea to your computer and use it in GitHub Desktop.
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