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

Side by Side Diff: test/test_endpoints.js

Issue 13775044: Remove the serviceInspector feature flag.
Patch Set: Remove the serviceInspector feature flag. Created 11 years, 6 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:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 This file is part of the Juju GUI, which lets users view and manage Juju 2 This file is part of the Juju GUI, which lets users view and manage Juju
3 environments within a graphical interface (https://launchpad.net/juju-gui). 3 environments within a graphical interface (https://launchpad.net/juju-gui).
4 Copyright (C) 2012-2013 Canonical Ltd. 4 Copyright (C) 2012-2013 Canonical Ltd.
5 5
6 This program is free software: you can redistribute it and/or modify it under 6 This program is free software: you can redistribute it and/or modify it under
7 the terms of the GNU Affero General Public License version 3, as published by 7 the terms of the GNU Affero General Public License version 3, as published by
8 the Free Software Foundation. 8 the Free Software Foundation.
9 9
10 This program is distributed in the hope that it will be useful, but WITHOUT 10 This program is distributed in the hope that it will be useful, but WITHOUT
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 models = Y.namespace('juju.models'); 336 models = Y.namespace('juju.models');
337 done(); 337 done();
338 }); 338 });
339 }); 339 });
340 340
341 beforeEach(function() { 341 beforeEach(function() {
342 destroyMe = []; 342 destroyMe = [];
343 conn = new utils.SocketStub(); 343 conn = new utils.SocketStub();
344 env = juju.newEnvironment({conn: conn}); 344 env = juju.newEnvironment({conn: conn});
345 env.connect(); 345 env.connect();
346 destroyMe.push(env);
rharding 2013/09/19 15:06:28 the env wasn't getting destroyed. This led to the
jeff.pihach 2013/09/19 15:36:06 Nice find
gary.poster 2013/09/19 15:51:29 +1
346 app = new Y.juju.App({env: env, consoleEnabled: true}); 347 app = new Y.juju.App({env: env, consoleEnabled: true});
348 app.showView(new Y.View());
347 destroyMe.push(app); 349 destroyMe.push(app);
348 app.showView(new Y.View());
349 controller = app.endpointsController; 350 controller = app.endpointsController;
351 controller.endpointsMap = {};
350 destroyMe.push(controller); 352 destroyMe.push(controller);
351 controller.endpointsMap = {};
352 }); 353 });
353 354
354 afterEach(function() { 355 afterEach(function() {
355 Y.each(destroyMe, function(thing) { 356 Y.each(destroyMe, function(thing) {
356 thing.destroy(); 357 thing.destroy();
357 }); 358 });
358 }); 359 });
359 360
360 it('should not update endpoints map when pending services are added', 361 it('should not update endpoints map when pending services are added',
361 function(done) { 362 function(done) {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 assertServiceGetCalled(); 583 assertServiceGetCalled();
583 var svc = app.db.services.getById(service_name); 584 var svc = app.db.services.getById(service_name);
584 charm_id = 'cs:precise/wordpress-3'; 585 charm_id = 'cs:precise/wordpress-3';
585 var charm2 = app.db.charms.add({id: charm_id, loaded: true}); 586 var charm2 = app.db.charms.add({id: charm_id, loaded: true});
586 destroyMe.push(charm2); 587 destroyMe.push(charm2);
587 svc.set('charm', charm_id); 588 svc.set('charm', charm_id);
588 assertServiceGetCalled(); 589 assertServiceGetCalled();
589 }); 590 });
590 591
591 }); 592 });
OLDNEW

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