Merge lp:~bcsaller/juju-gui/phantom-testing into lp:juju-gui/experimental

Proposed by Benjamin Saller
Status: Merged
Merged at revision: 341
Proposed branch: lp:~bcsaller/juju-gui/phantom-testing
Merge into: lp:juju-gui/experimental
Diff against target: 472 lines (+60/-73)
14 files modified
.lbox.check (+1/-1)
Makefile (+1/-1)
app/app.js (+11/-23)
app/assets/javascripts/d3-components.js (+2/-3)
app/models/models.js (+2/-5)
app/store/env.js (+12/-12)
app/views/charm.js (+3/-3)
app/views/environment.js (+0/-1)
app/views/unit.js (+2/-2)
app/views/utils.js (+7/-7)
test-server.sh (+4/-2)
test/index.html (+11/-9)
test/test_env.js (+2/-2)
test/utils.js (+2/-2)
To merge this branch: bzr merge lp:~bcsaller/juju-gui/phantom-testing
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+144629@code.launchpad.net

Description of the change

PhantomJS Testing support

Change test server to use phantomjs. To get this branch working you'll need

sudo npm install -g phantomjs
sudo npm install -g mocha-phantomjs

After that make test-debug and test-prod should work with CLI exit codes
and .lbox.check should run the tests as well.

To post a comment you must log in.
Revision history for this message
Benjamin Saller (bcsaller) wrote :

Reviewers: mp+144629_code.launchpad.net,

Message:
Please take a look.

Description:
PhantomJS Testing support

Change test server to use phantomjs. To get this branch working you'll
need

sudo npm install -g mocha-phantomjs

After that make test-debug and test-prod should work with CLI exit codes
and .lbox.check should run the tests as well.

https://code.launchpad.net/~bcsaller/juju-gui/phantom-testing/+merge/144629

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/7201049/

Affected files:
   M .lbox.check
   M Makefile
   A [revision details]
   M app/app.js
   M app/assets/javascripts/d3-components.js
   M app/models/models.js
   M app/store/env.js
   M app/views/charm.js
   M app/views/environment.js
   M app/views/unit.js
   M app/views/utils.js
   M test-server.sh
   M test/index.html
   M test/test_env.js
   M test/utils.js

Revision history for this message
Gary Poster (gary) wrote :

Trivial comments. Thank you for doing this! It looks good. I will
give it a try tomorrow morning.

https://codereview.appspot.com/7201049/diff/1/Makefile
File Makefile (right):

https://codereview.appspot.com/7201049/diff/1/Makefile#newcode336
Makefile:336:
trivial, but might as well revert this.

https://codereview.appspot.com/7201049/diff/1/app/app.js
File app/app.js (right):

https://codereview.appspot.com/7201049/diff/1/app/app.js#newcode199
app/app.js:199: // Concession to testing, they need muck
Trivial, but I suggest simply saying "PhantomJS handles the console
itself, if used."

https://codereview.appspot.com/7201049/diff/1/app/app.js#newcode648
app/app.js:648: //console.log('load service', evt);
Could simply delete IMO

https://codereview.appspot.com/7201049/diff/1/app/assets/javascripts/d3-components.js
File app/assets/javascripts/d3-components.js (right):

https://codereview.appspot.com/7201049/diff/1/app/assets/javascripts/d3-components.js#newcode319
app/assets/javascripts/d3-components.js:319: //console.debug('D3 Handler
for', selector, trigger);
Just delete it IMO

https://codereview.appspot.com/7201049/diff/1/app/assets/javascripts/d3-components.js#newcode497
app/assets/javascripts/d3-components.js:497: //console.log('Component',
methodName, 'on', name);
Just delete it IMO

https://codereview.appspot.com/7201049/diff/1/app/models/models.js
File app/models/models.js (right):

https://codereview.appspot.com/7201049/diff/1/app/models/models.js#newcode452
app/models/models.js:452: //console.log('Reset Application Database');
Just delete it IMO

https://codereview.appspot.com/7201049/diff/1/app/models/models.js#newcode460
app/models/models.js:460: //console.log('Delta');
Just delete it IMO

https://codereview.appspot.com/7201049/diff/1/app/store/env.js
File app/store/env.js (right):

https://codereview.appspot.com/7201049/diff/1/app/store/env.js#newcode32
app/store/env.js:32: //console.log('Env Init');
Just delete it IMO

https://codereview.appspot.com/7201049/diff/1/app/store/env.js#newcode56
app/store/env.js:56: //console.log('Env Connect');
Just delete it IMO, and so on for all other commented-out console.log
statements.

https://codereview.appspot.com/7201049/

Revision history for this message
Francesco Banconi (frankban) wrote :

Thanks for this branch Ben, it's cool to have a meaningful exit code
from our test suite.

+1 on removing all commented "console.log" lines.

Unfortunately, I get this error while trying to run tests:

$ make test-prod
./test-server.sh prod
prod server listening on 8084
make: *** [test-prod] Error 127

Info on mocha-phantomjs:

mocha-phantomjs@1.1.3 /usr/local/lib/node_modules/mocha-phantomjs
├── commander@1.0.5 (keypress@0.1.0)
└── mocha@1.8.1 (growl@1.7.0, commander@0.6.1, diff@1.0.2, debug@0.7.0,
mkdirp@0.3.3, ms@0.3.0, jade@0.26.3)

https://codereview.appspot.com/7201049/

Revision history for this message
Gary Poster (gary) wrote :

Hey. I duped Francesco's failure and dug into it a bit for exercise :-)
. It turns out that the problem for us is simply that mocha-phantomjs
can't find phantomjs. This is the pertinent code in
/usr/bin/mocha-phantomjs:

   85 var phantomjs;
   86 for (var i=0; i < module.paths.length; i++) {
   87 var bin = path.join(module.paths[i], '.bin/phantomjs');
   88 if (process.platform === 'win32') {
   89 bin += '.cmd';
   90 }
   91 if (exists(bin)) {
   92 phantomjs = spawn(bin, spawnArgs);
   93 break;
   94 }
   95 }
   96 if (phantomjs === undefined) { phantomjs = spawn('phantomjs',
spawnArgs); }

module.paths for me was this:

[ '/usr/lib/node_modules/mocha-phantomjs/bin/node_modules',
   '/usr/lib/node_modules/mocha-phantomjs/node_modules',
   '/usr/lib/node_modules',
   '/usr/node_modules',
   '/node_modules' ]

.bin/phantomjs does not exist in any of those locations, and then the
last check for a global phantomjs fails.

I found that if I simply installed a global phantomjs (`sudo npm install
-g phantomjs`) the tests ran great.

Unless someone has objections to all of us also installing phantomjs
globally, these are my additional suggestions beyond the previous
trivial comments.

  * In the "Developer Install" section of the HACKING document, record
the instructions to install both mocha-phantomjs and phantomjs globally.
  (Note that orange squad is coming on soon and will need that HACKING
document to actually work!)

  * Make a separate Makefile target for simply starting the test server.
For now, I'd like for us to still be able to run the tests occasionally
in browsers, and in the future, this is the kind of thing we will need
for CI test services.

Thanks

Gary

https://codereview.appspot.com/7201049/

Revision history for this message
Gary Poster (gary) wrote :

To be clear, my vote is "land with changes"

Thanks

https://codereview.appspot.com/7201049/

Revision history for this message
Benjamin Saller (bcsaller) wrote :

On 2013/01/24 13:04:16, gary.poster wrote:
> Hey. I duped Francesco's failure and dug into it a bit for exercise
:-) . It
> turns out that the problem for us is simply that mocha-phantomjs can't
find
> phantomjs. This is the pertinent code in /usr/bin/mocha-phantomjs:

> 85 var phantomjs;
> 86 for (var i=0; i < module.paths.length; i++) {
> 87 var bin = path.join(module.paths[i], '.bin/phantomjs');
> 88 if (process.platform === 'win32') {
> 89 bin += '.cmd';
> 90 }
> 91 if (exists(bin)) {
> 92 phantomjs = spawn(bin, spawnArgs);
> 93 break;
> 94 }
> 95 }
> 96 if (phantomjs === undefined) { phantomjs = spawn('phantomjs',
spawnArgs); }

> module.paths for me was this:

> [ '/usr/lib/node_modules/mocha-phantomjs/bin/node_modules',
> '/usr/lib/node_modules/mocha-phantomjs/node_modules',
> '/usr/lib/node_modules',
> '/usr/node_modules',
> '/node_modules' ]

> .bin/phantomjs does not exist in any of those locations, and then the
last check
> for a global phantomjs fails.

> I found that if I simply installed a global phantomjs (`sudo npm
install -g
> phantomjs`) the tests ran great.

Thanks.

> Unless someone has objections to all of us also installing phantomjs
globally,
> these are my additional suggestions beyond the previous trivial
comments.

> * In the "Developer Install" section of the HACKING document, record
the
> instructions to install both mocha-phantomjs and phantomjs globally.
(Note that
> orange squad is coming on soon and will need that HACKING document to
actually
> work!)

> * Make a separate Makefile target for simply starting the test
server. For
> now, I'd like for us to still be able to run the tests occasionally in
browsers,
> and in the future, this is the kind of thing we will need for CI test
services.

Agreed. I got enthusiastic once I started to get it working. I think we
can default to prod for the integrated test and debug for browser (as
you'll most likely be using the debugger at this point).

> Thanks

> Gary

https://codereview.appspot.com/7201049/

Revision history for this message
Benjamin Saller (bcsaller) wrote :

*** Submitted:

PhantomJS Testing support

Change test server to use phantomjs. To get this branch working you'll need

sudo npm install -g phantomjs
sudo npm install -g mocha-phantomjs

After that make test-debug and test-prod should work with CLI exit codes
and .lbox.check should run the tests as well.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.lbox.check'
2--- .lbox.check 2012-09-21 14:36:02 +0000
3+++ .lbox.check 2013-01-24 04:15:26 +0000
4@@ -1,3 +1,3 @@
5 #!/bin/sh
6
7-make lint
8+make lint test-prod
9
10=== modified file 'Makefile'
11--- Makefile 2013-01-22 08:33:50 +0000
12+++ Makefile 2013-01-24 04:15:26 +0000
13@@ -333,7 +333,7 @@
14
15 test-prod: build-prod
16 ./test-server.sh prod
17-
18+
19 test:
20 @echo "Deprecated. Please run either 'make test-prod' or 'make"
21 @echo "test-debug', to test the production or debug environments"
22
23=== modified file 'app/app.js'
24--- app/app.js 2013-01-19 14:57:23 +0000
25+++ app/app.js 2013-01-24 04:15:26 +0000
26@@ -194,10 +194,16 @@
27 */
28 initializer: function() {
29 // If this flag is true, start the application with the console activated
30- if (this.get('consoleEnabled')) {
31- consoleManager.native();
32- } else {
33- consoleManager.noop();
34+ var consoleEnabled = this.get('consoleEnabled');
35+
36+ // Concession to testing, they need muck
37+ // with console, we can't as well.
38+ if (window.mochaPhantomJS === undefined) {
39+ if (consoleEnabled) {
40+ consoleManager.native();
41+ } else {
42+ consoleManager.noop();
43+ }
44 }
45 // Create a client side database to store state.
46 this.db = new models.Database();
47@@ -236,13 +242,6 @@
48 env: this.env,
49 notifications: this.db.notifications});
50
51- // Event subscriptions
52-
53- this.on('*:navigateTo', function(e) {
54- console.log('navigateTo', e);
55- this.navigate(e.url);
56- }, this);
57-
58 // Notify user attempts to modify the environment without permission.
59 this.env.on('permissionDenied', this.onEnvPermissionDenied, this);
60
61@@ -271,22 +270,13 @@
62 // TODO - Bound views will automatically update this on individual models
63 this.db.on('update', this.on_database_changed, this);
64
65- this.on('navigate', function(e) {
66- console.log('app navigate', e);
67- });
68-
69 this.enableBehaviors();
70
71 this.once('ready', function(e) {
72 if (this.get('socket_url')) {
73 // Connect to the environment.
74- console.log('App: Connecting to environment');
75 this.env.connect();
76 }
77-
78- console.log(
79- 'App: Re-rendering current view', this.getPath(), 'info');
80-
81 if (this.get('activeView')) {
82 this.get('activeView').render();
83 } else {
84@@ -381,8 +371,6 @@
85 * @method show_unit
86 */
87 show_unit: function(req) {
88- console.log(
89- 'App: Route: Unit', req.params.id, req.path, req.pendingRoutes);
90 // This replacement honors service names that have a hyphen in them.
91 var unit_id = req.params.id.replace(/^(\S+)-(\d+)$/, '$1/$2');
92 var unit = this.db.units.getById(unit_id);
93@@ -657,7 +645,7 @@
94 * @method load_service
95 */
96 loadService: function(evt) {
97- console.log('load service', evt);
98+ //console.log('load service', evt);
99 if (evt.err) {
100 this.db.notifications.add(
101 new models.Notification({
102
103=== modified file 'app/assets/javascripts/d3-components.js'
104--- app/assets/javascripts/d3-components.js 2013-01-08 15:13:28 +0000
105+++ app/assets/javascripts/d3-components.js 2013-01-24 04:15:26 +0000
106@@ -253,7 +253,6 @@
107 // (re)Register the event to bubble.
108 self.publish(name, {emitFacade: true});
109 }
110- console.debug('yui event binding', module.name, eventPhase, name);
111 subscriptions.push(
112 target[eventPhase](
113 name, callback, handler.context));
114@@ -317,7 +316,7 @@
115 adapter = function() {
116 var selection = d3.select(this),
117 d = selection.data()[0];
118- console.debug('D3 Handler for', selector, trigger);
119+ //console.debug('D3 Handler for', selector, trigger);
120 return handler.callback.call(this, d, handler.context);
121 };
122 d3.selectAll(selector).on(trigger, adapter);
123@@ -495,7 +494,7 @@
124 all: function(methodName) {
125 Y.each(this.modules, function(mod, name) {
126 if (methodName in mod) {
127- console.log('Component', methodName, 'on', name);
128+ //console.log('Component', methodName, 'on', name);
129 mod[methodName]();
130 }
131 });
132
133=== modified file 'app/models/models.js'
134--- app/models/models.js 2013-01-19 06:46:17 +0000
135+++ app/models/models.js 2013-01-24 04:15:26 +0000
136@@ -449,20 +449,18 @@
137 this.relations.reset();
138 this.units.reset();
139 this.notifications.reset();
140- console.log('Reset Application Database');
141+ //console.log('Reset Application Database');
142 },
143
144 on_delta: function(delta_evt) {
145 var changes = delta_evt.data.result;
146- console.groupCollapsed('Delta');
147- console.log('Delta', this, changes);
148 var change_type, model_class = null,
149 self = this;
150
151+ //console.log('Delta');
152 changes.forEach(
153 Y.bind(function(change) {
154 change_type = change[0];
155- console.log('change', this, change);
156 this.getModelListByModelName(change_type).process_delta(
157 change[1], change[2]);
158 }, this));
159@@ -470,7 +468,6 @@
160 self.units.update_service_unit_aggregates(service);
161 });
162 this.fire('update');
163- console.groupEnd();
164 }
165
166 });
167
168=== modified file 'app/store/env.js'
169--- app/store/env.js 2013-01-18 09:57:41 +0000
170+++ app/store/env.js 2013-01-24 04:15:26 +0000
171@@ -29,7 +29,7 @@
172 // Prototype methods for your new class
173
174 initializer: function() {
175- console.log('Env Init');
176+ //console.log('Env Init');
177 // Define custom events
178 this.publish('msg', {
179 emitFacade: true,
180@@ -53,10 +53,10 @@
181 },
182
183 connect: function() {
184- console.log('Env Connect');
185+ //console.log('Env Connect');
186 // Allow an external websocket to be passed in.
187 var conn = this.get('conn');
188- console.log('ext ws', conn);
189+ //console.log('ext ws', conn);
190 if (conn) {
191 this.ws = conn;
192 } else {
193@@ -72,21 +72,21 @@
194 },
195
196 on_open: function(data) {
197- console.log('Env: Connected');
198+ //console.log('Env: Connected');
199 },
200
201 on_close: function(data) {
202- console.log('Env: Disconnect');
203+ //console.log('Env: Disconnect');
204 this.set('connected', false);
205 },
206
207 on_message: function(evt) {
208- console.log('Env: Receive', evt.data);
209+ //console.log('Env: Receive', evt.data);
210 var msg = Y.JSON.parse(evt.data);
211 // The "ready" attribute indicates that this is a server's initial
212 // greeting. It provides a few initial values that we care about.
213 if (msg.ready) {
214- console.log('Env: Handshake Complete');
215+ //console.log('Env: Handshake Complete');
216 this.set('connected', true);
217 this.set('providerType', msg.provider_type);
218 this.set('defaultSeries', msg.default_series);
219@@ -114,7 +114,7 @@
220 },
221
222 dispatch_result: function(data) {
223- console.log('Env: Dispatch Result', data);
224+ //console.log('Env: Dispatch Result', data);
225 this._dispatch_rpc_result(data);
226 this._dispatch_event(data);
227 },
228@@ -124,7 +124,7 @@
229 console.warn('Env: Unknown evt kind', evt);
230 return;
231 }
232- console.log('Env: Dispatch Evt', evt.op);
233+ //console.log('Env: Dispatch Evt', evt.op);
234 this.fire(evt.op, {data: evt});
235 },
236
237@@ -132,7 +132,7 @@
238 if ('request_id' in msg) {
239 var tid = msg.request_id;
240 if (tid in this._txn_callbacks) {
241- console.log('Env: Dispatch Rpc');
242+ //console.log('Env: Dispatch Rpc');
243 this._txn_callbacks[tid].apply(this, [msg]);
244 delete this._txn_callbacks[tid];
245 }
246@@ -174,7 +174,7 @@
247 }
248 op.request_id = tid;
249 var msg = Y.JSON.stringify(op);
250- console.log('Env: send msg', tid, msg, op);
251+ //console.log('Env: send msg', tid, msg, op);
252 this.ws.send(msg);
253 },
254
255@@ -258,7 +258,7 @@
256 */
257 deploy: function(charm_url, service_name, config, config_raw, num_units,
258 callback) {
259- console.log(charm_url, service_name, config, config_raw, num_units);
260+ //console.log(charm_url, service_name, config, config_raw, num_units);
261 this._send_rpc(
262 { op: 'deploy',
263 service_name: service_name,
264
265=== modified file 'app/views/charm.js'
266--- app/views/charm.js 2012-11-08 16:23:16 +0000
267+++ app/views/charm.js 2013-01-24 04:15:26 +0000
268@@ -61,7 +61,7 @@
269 on_charm_data: function(io_request) {
270 var charm = Y.JSON.parse(
271 io_request.response.results[0].responseText);
272- console.log('results update', charm, this);
273+ //console.log('results update', charm, this);
274 this.set('charm', charm);
275 this.render();
276 },
277@@ -71,7 +71,7 @@
278 container = this.get('container'),
279 charmUrl = charm.series + '/' + charm.name,
280 env = this.get('env');
281- console.log('charm deploy', charm);
282+ //console.log('charm deploy', charm);
283 // Generating charm url: see http://jujucharms.com/tools/store-missing
284 // for examples of charm addresses.
285 if (charm.owner !== 'charmers') {
286@@ -166,7 +166,7 @@
287 on_results_change: function(io_request) {
288 var result_set = Y.JSON.parse(
289 io_request.response.results[0].responseText);
290- console.log('results update', result_set, this);
291+ //console.log('results update', result_set, this);
292 this.set('charms', result_set.results);
293 this.render();
294 }
295
296=== modified file 'app/views/environment.js'
297--- app/views/environment.js 2013-01-21 15:08:07 +0000
298+++ app/views/environment.js 2013-01-24 04:15:26 +0000
299@@ -22,7 +22,6 @@
300 [views.JujuBaseView],
301 {
302 initializer: function() {
303- console.log('View: Initialized: Env');
304 this.publish('navigateTo', {
305 broadcast: true,
306 preventable: false});
307
308=== modified file 'app/views/unit.js'
309--- app/views/unit.js 2012-11-08 16:23:16 +0000
310+++ app/views/unit.js 2013-01-24 04:15:26 +0000
311@@ -21,7 +21,7 @@
312 */
313 var UnitView = Y.Base.create('UnitView', Y.View, [], {
314 initializer: function() {
315- console.log('view.init.unit', this.get('unit'));
316+ //console.log('view.init.unit', this.get('unit'));
317 },
318
319 template: Templates.unit,
320@@ -34,7 +34,7 @@
321 */
322 render: function() {
323 var container = this.get('container');
324- console.log('view.render.unit');
325+ //console.log('view.render.unit');
326 var unit = this.get('unit');
327 if (!unit) {
328 container.setHTML('<div class="alert">Loading...</div>');
329
330=== modified file 'app/views/utils.js'
331--- app/views/utils.js 2013-01-17 20:28:28 +0000
332+++ app/views/utils.js 2013-01-24 04:15:26 +0000
333@@ -553,8 +553,8 @@
334 };
335
336 utils.validate = function(values, schema) {
337- console.group('view.utils.validate');
338- console.log('validating', values, 'against', schema);
339+ //console.group('view.utils.validate');
340+ //console.log('validating', values, 'against', schema);
341 var errors = {};
342
343 function toString(value) {
344@@ -574,7 +574,7 @@
345
346 Y.Object.each(schema, function(field_definition, name) {
347 var value = toString(values[name]);
348- console.log('validating field', name, 'with value', value);
349+ //console.log('validating field', name, 'with value', value);
350
351 if (field_definition.type === 'int') {
352 if (!value) {
353@@ -597,10 +597,10 @@
354 }
355 }
356
357- console.log('generated this error (possibly undefined)', errors[name]);
358+ //console.log('generated this error (possibly undefined)', errors[name]);
359 });
360- console.log('returning', errors);
361- console.groupEnd();
362+ //console.log('returning', errors);
363+ //console.groupEnd();
364 return errors;
365 };
366
367@@ -996,7 +996,7 @@
368 });
369
370 Y.Handlebars.registerHelper('iflat', function(iface_decl, options) {
371- // console.log('helper', iface_decl, options, this);
372+ //console.log('helper', iface_decl, options, this);
373 var result = [];
374 var ret = '';
375 Y.Object.each(iface_decl, function(value, name) {
376
377=== modified file 'test-server.sh'
378--- test-server.sh 2012-12-07 17:57:27 +0000
379+++ test-server.sh 2013-01-24 04:15:26 +0000
380@@ -4,5 +4,7 @@
381
382 node ./test-server.js $1 &
383 sleep 2
384-xdg-open http://localhost:8084/test/
385-fg %1
386+mocha-phantomjs http://localhost:8084/test/index.html
387+status=$?
388+kill %1
389+exit $status
390
391=== modified file 'test/index.html'
392--- test/index.html 2013-01-17 16:19:17 +0000
393+++ test/index.html 2013-01-24 04:15:26 +0000
394@@ -10,12 +10,11 @@
395 <script src="assets/mocha.js"></script>
396 <script>
397 var assert = chai.assert,
398- expect = chai.expect;
399-
400- var should = chai.should();
401- console.log('mocha setup');
402- mocha.setup({'ui': 'bdd', 'ignoreLeaks': false, 'timeout': 20000})
403- console.log('mocha setup done');
404+ expect = chai.expect,
405+ should = chai.should();
406+ mocha.reporter('html');
407+ mocha.ui('bdd');
408+ mocha.setup({ignoreLeaks: false, timeout: 20000})
409 </script>
410
411 <!-- Load up YUI base, app modules, and test utils -->
412@@ -61,12 +60,15 @@
413 YUI_config = {
414 async: false,
415 consoleEnabled: true,
416- delayUntil: 'domready'
417+ delayUntil: 'domready',
418+ debug: false,
419+ filter: 'debug'
420 };
421
422 YUI().use(['node', 'event'], function(Y) {
423- // Run the tests.
424- if (window.mochaPhantomJS) { mochaPhantomJS.run(); }
425+ // Run the tests.
426+ if (window.mochaPhantomJS) {
427+ mochaPhantomJS.run(); }
428 else { mocha.run(); }
429 });
430 </script>
431
432=== modified file 'test/test_env.js'
433--- test/test_env.js 2013-01-18 09:57:41 +0000
434+++ test/test_env.js 2013-01-24 04:15:26 +0000
435@@ -59,14 +59,14 @@
436
437 it('can accept a callback on its methods', function(done) {
438 env.get_charm('cs:precise/mysql', function(result) {
439- console.log('invoked', result);
440+ //console.log('invoked', result);
441 result.op.should.equal('get_charm');
442 result.result.id.should.equal('cs:precise/mysql');
443 done();
444 });
445
446 msg = conn.last_message();
447- console.log('msg', msg);
448+ //console.log('msg', msg);
449 conn.msg({
450 'op': 'get_charm',
451 'request_id': msg.request_id,
452
453=== modified file 'test/utils.js'
454--- test/utils.js 2012-10-12 06:21:25 +0000
455+++ test/utils.js 2013-01-24 04:15:26 +0000
456@@ -24,7 +24,7 @@
457 };
458
459 this.msg = function(m) {
460- console.log('serializing env msg', m);
461+ //console.log('serializing env msg', m);
462 this.onmessage({'data': Y.JSON.stringify(m)});
463 };
464
465@@ -33,7 +33,7 @@
466 };
467
468 this.send = function(m) {
469- console.log('socket send', m);
470+ //console.log('socket send', m);
471 this.messages.push(Y.JSON.parse(m));
472 };
473

Subscribers

People subscribed via source and target branches