def test_hanode_relation_joined(self, mock_relation_set, mock_get_relation_ip): mock_get_relation_ip.return_value = '10.10.10.2' hooks.hanode_relation_joined('hanode:1') mock_get_relation_ip.assert_called_once_with('hanode') mock_relation_set.assert_called_once_with( relation_id='hanode:1', relation_settings={'private-address': '10.10.10.2'})
def test_hanode_relation_joined(self, mock_relation_set, mock_get_relation_ip): mock_get_relation_ip.return_value = '10.10.10.2' hooks.hanode_relation_joined('hanode:1') mock_get_relation_ip.assert_called_once_with('hanode') mock_relation_set.assert_called_once_with( relation_id='hanode:1', relation_settings={'private-address': '10.10.10.2'} )
def test_hanode_relation_joined(self, mock_relation_set, mock_get_relation_ip, mock_get_hostname): mock_get_hostname.return_value = 'juju-c2419e-0-lxd-1' mock_get_relation_ip.return_value = '10.10.10.2' hooks.hanode_relation_joined('hanode:1') mock_get_relation_ip.assert_called_once_with('hanode') mock_relation_set.assert_called_once_with(relation_id='hanode:1', relation_settings={ 'private-address': '10.10.10.2', 'hostname': 'juju-c2419e-0-lxd-1' })