Index: test/test_sandbox.js |
=== modified file 'test/test_sandbox.js' |
--- test/test_sandbox.js 2013-04-11 13:56:45 +0000 |
+++ test/test_sandbox.js 2013-04-15 21:50:16 +0000 |
@@ -999,16 +999,8 @@ |
state.deploy('cs:mysql', function(service) { |
var data = { |
op: 'add_relation', |
- endpoint_a: [ |
- 'wordpress', |
- { name: 'db', |
- role: 'client' } |
- ], |
- endpoint_b: [ |
- 'mysql', |
- { name: 'db', |
- role: 'server' } |
- ] |
+ endpoint_a: 'wordpress:db', |
+ endpoint_b: 'mysql:db' |
}; |
client.onmessage = function(rec) { |
var data = Y.JSON.parse(rec.data), |
@@ -1020,19 +1012,13 @@ |
id: 'relation-0', |
'interface': 'mysql', |
scope: 'global', |
- endpoints: [{ |
- wordpress: { |
- name: 'db', |
- role: 'client' |
- } |
- }, { |
- mysql: { |
- name: 'db', |
- role: 'server' |
- } |
- }] |
+ endpoints: [ |
+ {wordpress: {name: 'db'}}, |
+ {mysql: {name: 'db'}} |
+ ] |
} |
}; |
+ |
assert.equal(data.err, undefined); |
assert.equal(typeof data.result, 'object'); |
assert.deepEqual(data, mock); |
@@ -1057,17 +1043,13 @@ |
'interface': 'mysql', |
scope: 'global', |
request_id: rec.request_id, |
- endpoints: [{ |
- kumquat: { |
- name: 'db' |
- } |
- }, { |
- mysql: { |
- name: 'db' |
- } |
- }] |
+ endpoints: [ |
+ {kumquat: {name: 'db'}}, |
+ {mysql: {name: 'db'}} |
+ ] |
} |
}; |
+ |
assert.equal(rec.err, undefined); |
assert.equal(typeof rec.result, 'object'); |
assert.deepEqual(rec.details[0], mock); |
@@ -1095,16 +1077,8 @@ |
state.deploy('cs:puppet', function(service) { |
var data = { |
op: 'add_relation', |
- endpoint_a: [ |
- 'wordpress', |
- { name: 'juju-info', |
- role: 'server' } |
- ], |
- endpoint_b: [ |
- 'puppet', |
- { name: 'juju-info', |
- role: 'client' } |
- ] |
+ endpoint_a: 'wordpress:juju-info', |
+ endpoint_b: 'puppet:juju-info' |
}; |
client.onmessage = function(rec) { |
@@ -1115,19 +1089,12 @@ |
op: 'add_relation', |
result: { |
id: 'relation-0', |
- 'interface': 'puppet', |
+ 'interface': 'juju-info', |
scope: 'container', |
- endpoints: [{ |
- wordpress: { |
- name: 'juju-info', |
- role: 'server' |
- } |
- }, { |
- puppet: { |
- name: 'juju-info', |
- role: 'client' |
- } |
- }] |
+ endpoints: [ |
+ {puppet: {name: 'juju-info'}}, |
+ {wordpress: {name: 'juju-info'}} |
+ ] |
} |
}; |
assert.equal(data.err, undefined); |
@@ -1145,11 +1112,7 @@ |
function localCb() { |
var data = { |
op: 'add_relation', |
- endpoint_a: [ |
- 'wordpress', |
- { name: 'db', |
- role: 'client' } |
- ] |
+ endpoint_a: 'wordpress:db' |
}; |
state.nextChanges(); |
client.onmessage = function(rec) { |
@@ -1166,16 +1129,8 @@ |
function localCb() { |
var data = { |
op: 'add_relation', |
- endpoint_a: [ |
- 'wordpress', |
- { name: 'db', |
- role: 'client' } |
- ], |
- endpoint_b: [ |
- 'mysql', |
- { name: 'foo', |
- role: 'client' } |
- ] |
+ endpoint_a: 'wordpress:db', |
+ endpoint_b: 'mysql:foo' |
}; |
state.nextChanges(); |
client.onmessage = function(rec) { |