Skip to content

Instantly share code, notes, and snippets.

@gregarndt
Created July 29, 2015 18:32
Show Gist options
  • Save gregarndt/193e3e4b9044345722e4 to your computer and use it in GitHub Desktop.
Save gregarndt/193e3e4b9044345722e4 to your computer and use it in GitHub Desktop.
diff --git a/test/integration/device_link_test.js b/test/integration/device_link_test.js
index 1fd98ae..b3c5ff8 100644
--- a/test/integration/device_link_test.js
+++ b/test/integration/device_link_test.js
@@ -82,24 +82,25 @@ suite('device linking within containers', () => {
let result = await worker.postToQueue(task);
assert.equal(result.status.state, 'completed', 'Task state is not marked as completed');
assert.equal(
result.run.reasonResolved,
'completed',
'Task not resolved as complete'
);
});
- test('task failed when scopes not specified', async () => {
+ test('task failed when all scopes not specified', async () => {
worker = new TestWorker(DockerWorker);
await worker.launch();
let task = {
+ scopes: ['docker-worker:capability:device:loopbackVideo'],
payload: {
capabilities: {
devices: {
loopbackVideo: true,
loopbackAudio: true
}
},
image: 'ubuntu:14.10',
command: cmd(
'ls /dev',
@@ -137,47 +138,40 @@ suite('device linking within containers', () => {
ip = ip.address;
server.listen(() => {
testdroidUrl = `http:\/\/${ip}:${server.address().port}/`;
});
await waitForEvent(server, 'listening');
settings.configure({
capacity: 1,
deviceManagement: {
- loopbackAudio: {
- enabled: true
- },
- loopbackVideo: {
- enabled: true
- },
phone: {
enabled: true,
sims: '1',
type: 'flame-kk'
}
},
testdroid: {
url: testdroidUrl,
username: 'test',
password: 'pass'
}
});
worker = new TestWorker(DockerWorker);
await worker.launch();
let task = {
scopes: ['docker-worker:capability:device:phone'],
payload: {
capabilities: {
devices: {
- loopbackVideo: true,
phone: {
type: 'flame-kk',
sims: '1',
build: 'http://path/to/device.zip',
memory: '5000000'
}
}
},
image: 'ubuntu:14.10',
command: cmd('ls /dev'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment