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
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.

https://codereview.appspot.com/26430044/

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

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/legacyJujucharms/+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
=== modified file 'tests/test_utils.py'
--- 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 @@
          self.assertIn('password: "kumquat"', js_conf)

      @mock.patch('utils.legacy_juju')
+ def test_write_gui_config_default_sandbox_backend(self,
mock_legacy_juju):
+ mock_legacy_juju.return_value = True
+ write_gui_config(
+ False, 'This is login help.', True, True, self.charmworld_url,
+ self.build_dir, config_js_path='config',
+ password='kumquat', sandbox=True)
+ js_conf = self.files['config']
+ # Because this is sandbox, the apiBackend is always go, even
though it
+ # is legacy_juju.
+ self.assertIn('apiBackend: "go"', js_conf)
+
+ @mock.patch('utils.legacy_juju')
      def test_write_gui_config_default_go_password(self, mock_legacy_juju):
          mock_legacy_juju.return_value = False
          write_gui_config(

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

*** Submitted:

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.

R=bac
CC=
https://codereview.appspot.com/26430044

https://codereview.appspot.com/26430044/

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: