80
82
def test_block_storage_relation_changed_with_instance_id(self):
83
85
C{instance-id} is available in the relation data. To report
84
86
a successful device attach, it sets the relation data
85
87
C{block-device-path} to the attached volume's device path from nova.
90
self.addCleanup(setattr, os, "environ", os.environ)
89
93
setattr, hooks.hookenv, "_incoming_relation_data",
90
94
hooks.hookenv._incoming_relation_data)
91
95
hooks.hookenv._incoming_relation_data = (("instance-id", "i-123"),)
93
99
nova_attach = self.mocker.replace("nova_util.attach_nova_volume")
95
101
instance_id="i-123", volume_id=None, size=None, volume_label=None)