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: [email protected]

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 Merge Bot (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 Merge Bot (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
1=== modified file 'deployer/env/watchers.py'
2--- deployer/env/watchers.py 2018-04-17 14:17:12 +0000
3+++ deployer/env/watchers.py 2020-10-06 16:00:44 +0000
4@@ -95,6 +95,9 @@
5 units_in_error = self.units_in_error
6 for unit_name, data in self.units.items():
7 try:
8+ # Ensure message is set for each loop as we may test for it
9+ # lower down if we're not in err_status == 'Error'.
10+ message = None
11 err_status = data['Status']
12 goal_status = err_status
13 except KeyError:
14
15=== modified file 'deployer/tests/test_charm.py'
16--- deployer/tests/test_charm.py 2016-12-22 22:52:22 +0000
17+++ deployer/tests/test_charm.py 2020-10-06 16:00:44 +0000
18@@ -192,7 +192,7 @@
19 charm = Charm.from_service(
20 "scratch", self.repo_path, "precise", params)
21 self.assertRaises(ErrorExit, charm.fetch)
22- self.assertIn('bzr: ERROR: Not a branch: ', self.output.getvalue())
23+ self.assertIn('ERROR: Not a branch: ', self.output.getvalue())
24
25
26 class Git(BaseGit):

Subscribers

People subscribed via source and target branches