Ejemplo n.º 1
0
 def test_object_store_joined_with_identity_service_without_object_store(
         self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['identity-service']
     configs.write = MagicMock()
     relations.object_store_joined()
     self.juju_log.assert_called_with('swift relation incomplete')
Ejemplo n.º 2
0
 def test_object_store_joined_without_identity_service(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['']
     configs.write = MagicMock()
     relations.object_store_joined()
     self.juju_log.assert_called_with(
         'Deferring swift storage configuration until '
         'an identity-service relation exists')
Ejemplo n.º 3
0
 def test_object_store_joined_with_expose_image_locations_false(
         self, configs, mock_update_image_location_policy):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = [
         'identity-service', 'object-store'
     ]
     configs.write = MagicMock()
     relations.object_store_joined()
     self.assertTrue(mock_update_image_location_policy.called)
Ejemplo n.º 4
0
 def test_object_store_joined_with_identity_service_with_object_store(
         self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['identity-service',
                                               'object-store']
     configs.write = MagicMock()
     relations.object_store_joined()
     self.assertEquals([call('/etc/glance/glance-api.conf')],
                       configs.write.call_args_list)
Ejemplo n.º 5
0
 def test_object_store_joined_with_identity_service_without_object_store(
         self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['identity-service']
     configs.write = MagicMock()
     relations.object_store_joined()
     self.juju_log.assert_called_with(
         'swift relation incomplete'
     )
Ejemplo n.º 6
0
 def test_object_store_joined_without_identity_service(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['']
     configs.write = MagicMock()
     relations.object_store_joined()
     self.juju_log.assert_called_with(
         'Deferring swift storage configuration until '
         'an identity-service relation exists'
     )
 def test_object_store_joined_with_identity_service_with_object_store(
         self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = [
         'identity-service', 'object-store'
     ]
     configs.write = MagicMock()
     relations.object_store_joined()
     self.assertEquals([call('/etc/glance/glance-api.conf')],
                       configs.write.call_args_list)