Resync, rebase

This commit is contained in:
James Page
2014-10-01 23:14:32 +01:00
17 changed files with 400 additions and 65 deletions

View File

@@ -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'})