Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1298)

Delta Between Two Patch Sets: test/test_fakebackend.js

Issue 9153044: sandbox event simulator
Left Patch Set: sandbox event simulator Created 11 years, 11 months ago
Right Patch Set: sandbox event simulator Created 11 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « test/test_environment_view.js ('k') | test/test_sandbox.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 })();
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b