03331b19f3
1. Ported common.utils.exception_to_str() back to glance_store. 2. Used exception_to_str() to consistently cast the exception to avoid potential encoding issue. Change-Id: I398ea0e218ebb37b9041cfe82f18b11e614662bf Related-Id: I77478a8eeeefd85bf98138156429df53d0a4c079 Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
# Copyright 2011-2013 OpenStack Foundation
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
import glance_store as store
|
|
from glance_store.tests import base
|
|
|
|
|
|
class TestStoreBase(base.StoreBaseTest):
|
|
|
|
def setUp(self):
|
|
super(TestStoreBase, self).setUp()
|
|
self.config(default_store='file', group='glance_store')
|
|
|
|
def test_create_store_exclude_unconfigurable_drivers(self):
|
|
self.config(stores=["no_conf", "file"], group='glance_store')
|
|
count = store.create_stores(self.conf)
|
|
self.assertEqual(count, 1)
|