Merge lp://staging/~thedac/charmsupport/volume-management into lp://staging/charmsupport

Proposed by David Ames
Status: Merged
Approved by: Matthew Wedgwood
Approved revision: 39
Merged at revision: 37
Proposed branch: lp://staging/~thedac/charmsupport/volume-management
Merge into: lp://staging/charmsupport
Diff against target: 57 lines (+8/-6)
3 files modified
charmsupport/hookenv.py (+5/-1)
charmsupport/volumes.py (+1/-1)
tests/test_hookenv.py (+2/-4)
To merge this branch: bzr merge lp://staging/~thedac/charmsupport/volume-management
Reviewer Review Type Date Requested Status
Matthew Wedgwood (community) Approve
Sidnei da Silva (community) Approve
Review via email: mp+160518@code.staging.launchpad.net

Commit message

Fix dictionary check for volume_map
Allow non-relation context runs
Fixed unit test for no relation set

Description of the change

Fix dictionary check for volume_map
Allow non-relation context runs

To post a comment you must log in.
Revision history for this message
Sidnei da Silva (sidnei) wrote :

Tried to land it, but it breaks an existing test. I think the test might need adjusting.

review: Needs Fixing
Revision history for this message
David Ames (thedac) wrote :

The code attempts to avoid executing realtion-ids with no reltype.

relation-ids with no reltype produces:

root@juju-stagingstack-u1-musicsearch-instance-9:/var/lib/juju/units/u1-msearch-be-1-1/charm# relation-ids
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/juju/juju/juju/hooks/commands.py", line 132, in run
    raise MustSpecifyRelationName()
juju.hooks.protocol.MustSpecifyRelationName: Relation name must be specified
2013-04-24 16:09:31,686 ERROR: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/juju/juju/juju/hooks/commands.py", line 132, in run
    raise MustSpecifyRelationName()
juju.hooks.protocol.MustSpecifyRelationName: Relation name must be specified

2013-04-24 16:09:31,687 ERROR: [Failure instance: Traceback: <class 'juju.hooks.protocol.MustSpecifyRelationName'>: Relation name must be specified
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:545:_runCallbacks
/usr/lib/juju/juju/juju/hooks/cli.py:190:_run
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:134:maybeDeferred
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:1181:unwindGenerator
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:1039:_inlineCallbacks
/usr/lib/juju/juju/juju/hooks/commands.py:132:run
]

39. By David Ames

Fix unit test for no relation context

Revision history for this message
David Ames (thedac) wrote :

Unit test fixed per Sidnei

Revision history for this message
Sidnei da Silva (sidnei) :
review: Approve
Revision history for this message
Matthew Wedgwood (mew) wrote :

+1

review: Approve

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