LEFT | RIGHT |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 (function() { | 3 (function() { |
4 | 4 |
5 // Helpers | 5 // Helpers |
6 // Verify that an expected Error was found. | 6 // Verify that an expected Error was found. |
7 var ERROR = function(errString, done) { | 7 var ERROR = function(errString, done) { |
8 return function(result) { | 8 return function(result) { |
9 assert.equal(errString, result.error); | 9 assert.equal(errString, result.error); |
10 done(); | 10 done(); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 assert.lengthOf(units, 3); | 171 assert.lengthOf(units, 3); |
172 assert.lengthOf(result.units, 3); | 172 assert.lengthOf(result.units, 3); |
173 assert.deepEqual(units, result.units); | 173 assert.deepEqual(units, result.units); |
174 }); | 174 }); |
175 | 175 |
176 it('reports when the charm store is inaccessible.', function() { | 176 it('reports when the charm store is inaccessible.', function() { |
177 fakebackend.get('charmStore').loadByPath = function(path, options) { | 177 fakebackend.get('charmStore').loadByPath = function(path, options) { |
178 options.failure({boo: 'hiss'}); | 178 options.failure({boo: 'hiss'}); |
179 }; | 179 }; |
180 fakebackend.deploy('cs:wordpress', callback); | 180 fakebackend.deploy('cs:wordpress', callback); |
181 assert.equal(result.error, 'Could not contact charm store.'); | 181 assert.equal(result.error, 'Error interacting with Charm store.'); |
182 }); | 182 }); |
183 | 183 |
184 it('honors the optional service name', function() { | 184 it('honors the optional service name', function() { |
185 assert.isUndefined( | 185 assert.isUndefined( |
186 fakebackend.deploy('cs:wordpress', callback, {name: 'kumquat'})); | 186 fakebackend.deploy('cs:wordpress', callback, {name: 'kumquat'})); |
187 assert.equal(result.service.get('id'), 'kumquat'); | 187 assert.equal(result.service.get('id'), 'kumquat'); |
188 }); | 188 }); |
189 | 189 |
190 it('prefers config YAML to config.', function() { | 190 it('prefers config YAML to config.', function() { |
191 fakebackend.deploy( | 191 fakebackend.deploy( |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 ['cs:wordpress', 'cs:mysql'], | 1196 ['cs:wordpress', 'cs:mysql'], |
1197 ['wordpress:db', 'mysql:db'], | 1197 ['wordpress:db', 'mysql:db'], |
1198 ['wordpress:bar', 'mysql:baz'], | 1198 ['wordpress:bar', 'mysql:baz'], |
1199 {error: 'Relationship does not exist'}, | 1199 {error: 'Relationship does not exist'}, |
1200 done); | 1200 done); |
1201 }); | 1201 }); |
1202 | 1202 |
1203 }); | 1203 }); |
1204 | 1204 |
1205 })(); | 1205 })(); |
LEFT | RIGHT |