Merge "Fix tests for logging connection info"
This commit is contained in:
commit
331ce59a50
@ -21,6 +21,7 @@ import glance_store
|
|||||||
from glance_store._drivers import cinder
|
from glance_store._drivers import cinder
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
from oslo_utils import strutils
|
||||||
|
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance.tests import functional
|
from glance.tests import functional
|
||||||
@ -136,8 +137,9 @@ class TestLegacyUpdateCinderStore(functional.SynchronousAPIBase):
|
|||||||
@mock.patch.object(cinder, 'connector')
|
@mock.patch.object(cinder, 'connector')
|
||||||
@mock.patch.object(cinder, 'open')
|
@mock.patch.object(cinder, 'open')
|
||||||
@mock.patch('glance_store._drivers.cinder.Store._wait_volume_status')
|
@mock.patch('glance_store._drivers.cinder.Store._wait_volume_status')
|
||||||
def test_create_image(self, mock_wait, mock_open, mock_connector,
|
@mock.patch.object(strutils, 'mask_dict_password')
|
||||||
mock_chown, mocked_cc):
|
def test_create_image(self, mock_mask_pass, mock_wait, mock_open,
|
||||||
|
mock_connector, mock_chown, mocked_cc):
|
||||||
# setup multiple cinder stores
|
# setup multiple cinder stores
|
||||||
self.setup_multiple_stores()
|
self.setup_multiple_stores()
|
||||||
self.start_server()
|
self.start_server()
|
||||||
@ -163,9 +165,10 @@ class TestLegacyUpdateCinderStore(functional.SynchronousAPIBase):
|
|||||||
@mock.patch.object(cinder, 'connector')
|
@mock.patch.object(cinder, 'connector')
|
||||||
@mock.patch.object(cinder, 'open')
|
@mock.patch.object(cinder, 'open')
|
||||||
@mock.patch('glance_store._drivers.cinder.Store._wait_volume_status')
|
@mock.patch('glance_store._drivers.cinder.Store._wait_volume_status')
|
||||||
def test_migrate_image_after_upgrade(self, mock_wait, mock_open,
|
@mock.patch.object(strutils, 'mask_dict_password')
|
||||||
mock_connector, mock_chown,
|
def test_migrate_image_after_upgrade(self, mock_mask_pass, mock_wait,
|
||||||
mocked_cc):
|
mock_open, mock_connector,
|
||||||
|
mock_chown, mocked_cc):
|
||||||
"""Test to check if an image is successfully migrated when we
|
"""Test to check if an image is successfully migrated when we
|
||||||
|
|
||||||
upgrade from a single cinder store to multiple cinder stores.
|
upgrade from a single cinder store to multiple cinder stores.
|
||||||
@ -208,9 +211,11 @@ class TestLegacyUpdateCinderStore(functional.SynchronousAPIBase):
|
|||||||
@mock.patch.object(cinder, 'connector')
|
@mock.patch.object(cinder, 'connector')
|
||||||
@mock.patch.object(cinder, 'open')
|
@mock.patch.object(cinder, 'open')
|
||||||
@mock.patch('glance_store._drivers.cinder.Store._wait_volume_status')
|
@mock.patch('glance_store._drivers.cinder.Store._wait_volume_status')
|
||||||
def test_migrate_image_after_upgrade_not_owner(self, mock_wait, mock_open,
|
@mock.patch.object(strutils, 'mask_dict_password')
|
||||||
mock_connector, mock_chown,
|
def test_migrate_image_after_upgrade_not_owner(self, mock_mask_pass,
|
||||||
mocked_cc):
|
mock_wait, mock_open,
|
||||||
|
mock_connector,
|
||||||
|
mock_chown, mocked_cc):
|
||||||
"""Test to check if an image is successfully migrated when we upgrade
|
"""Test to check if an image is successfully migrated when we upgrade
|
||||||
from a single cinder store to multiple cinder stores, and that
|
from a single cinder store to multiple cinder stores, and that
|
||||||
GETs from non-owners in the meantime are not interrupted.
|
GETs from non-owners in the meantime are not interrupted.
|
||||||
|
Loading…
Reference in New Issue
Block a user