Merge lp:~gary/juju-gui/exportBugs into lp:juju-gui/experimental
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 1149 | ||||||||
Proposed branch: | lp:~gary/juju-gui/exportBugs | ||||||||
Merge into: | lp:juju-gui/experimental | ||||||||
Diff against target: |
182 lines (+74/-12) 5 files modified
app/models/models.js (+7/-3) app/store/env/fakebackend.js (+7/-3) test/data/wp-deployer.yaml (+2/-5) test/test_fakebackend.js (+12/-1) test/test_model.js (+46/-0) |
||||||||
To merge this branch: | bzr merge lp:~gary/juju-gui/exportBugs | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email:
|
Description of the change
Fix export and import bugs
Our support for exporting and importing config values and expose flags was buggy. This fixes four discrete but related bugs.
- Exporting config values would exclude those that had false-y default values.
- We did not export the expose flag.
- Importing config values did not work.
- We called the expose flag "exposed", which is not what the actual delpoyer expects.
To qa, open up the sandbox, deploy apache with "enable_modules" set to something or other, and expose it. Then export the environment. When you look at the service in the file, you should see "expose: true" and "enable_modules: mod_proxy" or whatever value you set. Then reload the GUI and drag the file into the sandbox. When the service has loaded, you should see that it is exposed, and when you look at the config in the inspector, you should see your value in the "enable_modules" field.
Reviewers: mp+192286_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix export and import bugs
Our support for exporting and importing config values and expose flags
was buggy. This fixes four discrete but related bugs.
- Exporting config values would exclude those that had false-y default
values.
- We did not export the expose flag.
- Importing config values did not work.
- We called the expose flag "exposed", which is not what the actual
delpoyer expects.
To qa, open up the sandbox, deploy apache with "enable_modules" set to
something or other, and expose it. Then export the environment. When
you look at the service in the file, you should see "expose: true" and
"enable_modules: mod_proxy" or whatever value you set. Then reload the
GUI and drag the file into the sandbox. When the service has loaded,
you should see that it is exposed, and when you look at the config in
the inspector, you should see your value in the "enable_modules" field.
https:/ /code.launchpad .net/~gary/ juju-gui/ exportBugs/ +merge/ 192286
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/15400052/
Affected files (+76, -12 lines): models. js env/fakebackend .js wp-deployer. yaml fakebackend. js
A [revision details]
M app/models/
M app/store/
M test/data/
M test/test_
M test/test_model.js
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: test/test_ fakebackend. js fakebackend. js' fakebackend. js 2013-10-15 08:16:18 +0000 fakebackend. js 2013-10-23 05:23:16 +0000
=== modified file 'test/test_
--- test/test_
+++ test/test_
@@ -528,6 +528,10 @@
});
});
+ beforeEach( function( ) { ackend( ); (function( ) {
fakebackend. destroy( );
+ fakebackend = utils.makeFakeB
+ });
+
afterEach
if (fakebackend) {
@@ -555,9 +559,16 @@
// Verify config. db.services. getById( 'wordpress' ); db.charms. getById( wordpress- 15'); db.services. getById( 'mysql' ); equal(wordpress .get('config. engine' ), 'nginx'); equal(wordpress Charm.get( 'options. engine. default' ), 'nginx'); equal(wordpress .get('config. engine' ), 'apache');
assert. equal(wordpress .get('config. tuning' ), 'single'); isTrue( wordpress. get('exposed' )); isFalse( mysql.get( 'exposed' ));
var wordpress = fakebackend.
+ var wordpressCharm = fakebackend.
+ 'cs:precise/
var mysql = fakebackend.
- assert.
+ // This value is different from the default (nginx).
+
assert.
+ assert.
+ // This value is the default, as provided by the charm.
+ assert.
+ assert.
// Constraints 'constraints' );
var constraints = mysql.get(
Index: test/test_model.js model.js'
=== modified file 'test/test_
--- test/test_model.js 2013-10-16 11:55:56 +0000
+++ test/test_model.js 2013-10-23 03:34:59 +0000
@@...