diff --git a/glance_store/_drivers/cinder/nfs.py b/glance_store/_drivers/cinder/nfs.py index 0e092d26..58631972 100644 --- a/glance_store/_drivers/cinder/nfs.py +++ b/glance_store/_drivers/cinder/nfs.py @@ -53,7 +53,7 @@ class NfsBrickConnector(base.BaseBrickConnectorInterface): @staticmethod def get_hash_str(base_str): - """Returns string that represents SHA256 hash of base_str (in hex format). + """Returns string representing SHA256 hash of base_str in hex format. If base_str is a Unicode string, encode it to UTF-8. """ diff --git a/glance_store/tests/unit/cinder/test_base.py b/glance_store/tests/unit/cinder/test_base.py index 7c0add56..304d09da 100644 --- a/glance_store/tests/unit/cinder/test_base.py +++ b/glance_store/tests/unit/cinder/test_base.py @@ -38,7 +38,7 @@ class TestConnectorBase(test_base.StoreBaseTest): def test_factory(self, protocol, expected_class): connector_class = base.factory( connection_info={'driver_volume_type': protocol}) - self.assertTrue(isinstance(connector_class, expected_class)) + self.assertIsInstance(connector_class, expected_class) class TestBaseBrickConnectorInterface(test_base.StoreBaseTest): diff --git a/glance_store/tests/unit/cinder/test_cinder_base.py b/glance_store/tests/unit/cinder/test_cinder_base.py index 3269de11..52a36660 100644 --- a/glance_store/tests/unit/cinder/test_cinder_base.py +++ b/glance_store/tests/unit/cinder/test_cinder_base.py @@ -766,7 +766,7 @@ class TestCinderStoreBase(object): mock_wait.side_effect = [fake_volume, exceptions.BackendException] self.assertRaises( - Exception, self.store.add, expected_image_id, # noqa + exceptions.StorageFull, self.store.add, expected_image_id, image_file, expected_size, self.hash_algo, self.context, verifier) fake_volume.delete.assert_called_once() diff --git a/requirements.txt b/requirements.txt index ffd4fd71..9d7adfea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,3 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. oslo.config>=5.2.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 2eaa2262..edec4cbb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,8 +1,4 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -# Metrics and style -hacking>=3.0.1,<3.1.0 # Apache-2.0 +hacking>=6.1.0,<6.2.0 # Apache-2.0 # Documentation style doc8>=0.6.0 # Apache-2.0