From 7ee7ac5899b451a9d9e2f7b0a2b664fcd5ba3a57 Mon Sep 17 00:00:00 2001 From: Arnaud Morin Date: Fri, 5 Jul 2024 11:54:34 +0200 Subject: [PATCH] Stop testing old release of cinder A test in datera was failing locally due to the fact the the version checking could be wrong in the egg-info local folder if you switch from a branch to another. It's not necessary to test this anymore as Cinder version 15 (train) is EOL anyway. Signed-off-by: Arnaud Morin Change-Id: I0d17899c0b239ec969ff51238dcbd4402a567f6c --- .../tests/unit/volume/drivers/test_datera.py | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/cinder/tests/unit/volume/drivers/test_datera.py b/cinder/tests/unit/volume/drivers/test_datera.py index de7eb4f5c52..1d28a3200c3 100644 --- a/cinder/tests/unit/volume/drivers/test_datera.py +++ b/cinder/tests/unit/volume/drivers/test_datera.py @@ -20,7 +20,6 @@ import uuid from cinder import context from cinder import exception from cinder.tests.unit import test -from cinder import version from cinder.volume import configuration as conf from cinder.volume import volume_types @@ -430,21 +429,13 @@ class DateraVolumeTestCasev22(test.TestCase): offset = mock.MagicMock() sort_keys = mock.MagicMock() sort_dirs = mock.MagicMock() - if (version.version_string() >= '15.0.0'): - with mock.patch( - 'cinder.volume.volume_utils.paginate_entries_list') \ - as mpage: - self.driver.get_manageable_volumes( - [testvol], marker, limit, offset, sort_keys, sort_dirs) - mpage.assert_called_once_with( - [v1, v2], marker, limit, offset, sort_keys, sort_dirs) - else: - with mock.patch( - 'cinder.volume.utils.paginate_entries_list') as mpage: - self.driver.get_manageable_volumes( - [testvol], marker, limit, offset, sort_keys, sort_dirs) - mpage.assert_called_once_with( - [v1, v2], marker, limit, offset, sort_keys, sort_dirs) + with mock.patch( + 'cinder.volume.volume_utils.paginate_entries_list') \ + as mpage: + self.driver.get_manageable_volumes( + [testvol], marker, limit, offset, sort_keys, sort_dirs) + mpage.assert_called_once_with( + [v1, v2], marker, limit, offset, sort_keys, sort_dirs) def test_unmanage(self): testvol = _stub_volume()