Merge lp://staging/~gary/charms/precise/juju-gui/legacyJujucharms into lp://staging/~juju-gui/charms/precise/juju-gui/trunk
Proposed by
Gary Poster
Status: | Merged |
---|---|
Merged at revision: | 131 |
Proposed branch: | lp://staging/~gary/charms/precise/juju-gui/legacyJujucharms |
Merge into: | lp://staging/~juju-gui/charms/precise/juju-gui/trunk |
Diff against target: |
35 lines (+13/-1) 2 files modified
hooks/utils.py (+1/-1) tests/test_utils.py (+12/-0) |
To merge this branch: | bzr merge lp://staging/~gary/charms/precise/juju-gui/legacyJujucharms |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
charmers | Pending | ||
Review via email: mp+195293@code.staging.launchpad.net |
Description of the change
Sandbox should always use go
On jujucharms, bundle deployment wasn't working because we were using the python sandbox (because jujucharms still uses pyjuju). Thank you to Francesco for noticing, diagnosing, and offering a fix. This is his fix with a quick test.
To post a comment you must log in.
Reviewers: mp+195293_ code.launchpad. net,
Message:
Please take a look.
Description:
Sandbox should always use go
On jujucharms, bundle deployment wasn't working because we were using
the python sandbox (because jujucharms still uses pyjuju). Thank you to
Francesco for noticing, diagnosing, and offering a fix. This is his fix
with a quick test.
https:/ /code.launchpad .net/~gary/ charms/ precise/ juju-gui/ legacyJujucharm s/+merge/ 195293
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/26430044/
Affected files (+15, -1 lines):
A [revision details]
M hooks/utils.py
M tests/test_utils.py
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: hooks/utils.py
=== modified file 'hooks/utils.py'
--- hooks/utils.py 2013-11-13 18:01:03 +0000
+++ hooks/utils.py 2013-11-14 19:10:28 +0000
@@ -420,7 +420,7 @@
password = password if password else None
if password is None and ((is_legacy_juju and in_staging) or sandbox):
password = 'admin'
- api_backend = 'python' if is_legacy_juju else 'go'
+ api_backend = 'python' if (is_legacy_juju and not sandbox) else 'go'
if secure:
protocol = 'wss'
else:
Index: tests/test_utils.py test_utils. py'
self. assertIn( 'password: "kumquat"', js_conf)
=== modified file 'tests/
--- tests/test_utils.py 2013-11-12 12:23:25 +0000
+++ tests/test_utils.py 2013-11-14 19:10:28 +0000
@@ -1059,6 +1059,18 @@
@ mock.patch( 'utils. legacy_ juju') gui_config_ default_ sandbox_ backend( self, juju.return_ value = True _url, js_path= 'config' , 'config' ] 'apiBackend: "go"', js_conf) 'utils. legacy_ juju') gui_config_ default_ go_password( self, mock_legacy_juju):
mock_ legacy_ juju.return_ value = False
write_ gui_config(
+ def test_write_
mock_legacy_juju):
+ mock_legacy_
+ write_gui_config(
+ False, 'This is login help.', True, True, self.charmworld
+ self.build_dir, config_
+ password='kumquat', sandbox=True)
+ js_conf = self.files[
+ # Because this is sandbox, the apiBackend is always go, even
though it
+ # is legacy_juju.
+ self.assertIn(
+
+ @mock.patch(
def test_write_