Merge lp:~mthaddon/juju-deployer/fix-test-failures into lp:juju-deployer

Proposed by Tom Haddon
Status: Merged
Approved by: Tom Haddon
Approved revision: 217
Merged at revision: 217
Proposed branch: lp:~mthaddon/juju-deployer/fix-test-failures
Merge into: lp:juju-deployer
Diff against target: 26 lines (+4/-1)
2 files modified
deployer/env/watchers.py (+3/-0)
deployer/tests/test_charm.py (+1/-1)
To merge this branch: bzr merge lp:~mthaddon/juju-deployer/fix-test-failures
Reviewer Review Type Date Requested Status
Barry Price Approve
Canonical IS Reviewers Pending
Review via email: mp+391883@code.launchpad.net

Commit message

Fix test failures

Description of the change

Fix test failures.

Without this update we're seeing test failures on focal (where bzr is brz). Also seeing failures in juju 1 deployments as below.

Traceback (most recent call last):
  File "/usr/bin/juju-deployer", line 9, in <module>
    load_entry_point('juju-deployer==0.11.0', 'console_scripts', 'juju-deployer')()
  File "/usr/lib/python3/dist-packages/deployer/cli.py", line 140, in main
    run()
  File "/usr/lib/python3/dist-packages/deployer/cli.py", line 250, in run
    importer.Importer(env, deployment, options).run()
  File "/usr/lib/python3/dist-packages/deployer/action/importer.py", line 307, in run
    self.wait_for_units(ignore_errors=ignore_errors)
  File "/usr/lib/python3/dist-packages/deployer/action/importer.py", line 278, in wait_for_units
    services=self.deployment.get_service_names(), on_errors=on_errors)
  File "/usr/lib/python3/dist-packages/deployer/env/go.py", line 279, in wait_for_units
    services=services, on_errors=on_errors).run(callback)
  File "/usr/lib/python3/dist-packages/jujuclient/watch.py", line 167, in run
    if self.complete() is True:
  File "/usr/lib/python3/dist-packages/deployer/env/watchers.py", line 114, in complete
    message != "running update-status hook":

To post a comment you must log in.
Revision history for this message
Barry Price (barryprice) wrote :

LGTM +1

review: Approve
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

Change successfully merged at revision 217

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'deployer/env/watchers.py'
--- deployer/env/watchers.py 2018-04-17 14:17:12 +0000
+++ deployer/env/watchers.py 2020-10-06 16:00:44 +0000
@@ -95,6 +95,9 @@
95 units_in_error = self.units_in_error95 units_in_error = self.units_in_error
96 for unit_name, data in self.units.items():96 for unit_name, data in self.units.items():
97 try:97 try:
98 # Ensure message is set for each loop as we may test for it
99 # lower down if we're not in err_status == 'Error'.
100 message = None
98 err_status = data['Status']101 err_status = data['Status']
99 goal_status = err_status102 goal_status = err_status
100 except KeyError:103 except KeyError:
101104
=== modified file 'deployer/tests/test_charm.py'
--- deployer/tests/test_charm.py 2016-12-22 22:52:22 +0000
+++ deployer/tests/test_charm.py 2020-10-06 16:00:44 +0000
@@ -192,7 +192,7 @@
192 charm = Charm.from_service(192 charm = Charm.from_service(
193 "scratch", self.repo_path, "precise", params)193 "scratch", self.repo_path, "precise", params)
194 self.assertRaises(ErrorExit, charm.fetch)194 self.assertRaises(ErrorExit, charm.fetch)
195 self.assertIn('bzr: ERROR: Not a branch: ', self.output.getvalue())195 self.assertIn('ERROR: Not a branch: ', self.output.getvalue())
196196
197197
198class Git(BaseGit):198class Git(BaseGit):

Subscribers

People subscribed via source and target branches