Resync, rebase
This commit is contained in:
@@ -70,3 +70,23 @@ class TestGlanceContexts(CharmTestCase):
|
||||
'namespace': 'glance'})
|
||||
self.assertTrue(mock_https.called)
|
||||
mock_unit_get.assert_called_with('private-address')
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.config')
|
||||
@patch('glance_contexts.config')
|
||||
def test_glance_ipv6_context_service_enabled(self, mock_config,
|
||||
mock_context_config):
|
||||
mock_config.return_value = True
|
||||
mock_context_config.return_value = True
|
||||
ctxt = contexts.GlanceIPv6Context()
|
||||
self.assertEquals(ctxt(), {'bind_host': '::',
|
||||
'registry_host': '[::]'})
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.config')
|
||||
@patch('glance_contexts.config')
|
||||
def test_glance_ipv6_context_service_disabled(self, mock_config,
|
||||
mock_context_config):
|
||||
mock_config.return_value = False
|
||||
mock_context_config.return_value = False
|
||||
ctxt = contexts.GlanceIPv6Context()
|
||||
self.assertEquals(ctxt(), {'bind_host': '0.0.0.0',
|
||||
'registry_host': '0.0.0.0'})
|
||||
|
||||
Reference in New Issue
Block a user