diff options
| author | Dr. Jens Harbott <harbott@osism.tech> | 2022-08-22 14:15:02 +0200 |
|---|---|---|
| committer | Dr. Jens Harbott <harbott@osism.tech> | 2022-08-22 14:15:02 +0200 |
| commit | 0fc8712cace61aee19335951409068cef8009dba (patch) | |
| tree | 4af76674cb1b9d517daab96e9ebf49bc5750dfeb /kolla/tests | |
| parent | 3e5369db541c60df6d5cddccc20b04f50a3d45ad (diff) | |
| download | kolla-0fc8712cace61aee19335951409068cef8009dba.tar.gz kolla-0fc8712cace61aee19335951409068cef8009dba.zip | |
Bump minimum docker-py version
With version 6.0.0 of the docker python module, their implementation of
versioning has changed, making our check for old versions fail. Since
version 3.0.0 is from 2018, we should be safe to assume that as a
minimum version though, so we can just get rid of the special handling
of older versions.
Change-Id: I077b7b5acf2c1f9beb6da06d3555e2ebe30831d1
Diffstat (limited to 'kolla/tests')
| -rw-r--r-- | kolla/tests/test_build.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index 9e44d1bc6..ab6e37432 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -59,18 +59,6 @@ class TasksTest(base.TestCase): self.imageChild.parent = self.image self.imageChild.path = self.useFixture(fixtures.TempDir()).path - @mock.patch('docker.version', '2.7.0') - @mock.patch.dict(os.environ, clear=True) - @mock.patch('docker.APIClient') - def test_push_image_before_v3_0_0(self, mock_client): - self.dc = mock_client - pusher = build.PushTask(self.conf, self.image) - pusher.run() - mock_client().push.assert_called_once_with( - self.image.canonical_name, decode=True, - stream=True, insecure_registry=True) - - @mock.patch('docker.version', '3.0.0') @mock.patch.dict(os.environ, clear=True) @mock.patch('docker.APIClient') def test_push_image(self, mock_client): @@ -81,7 +69,6 @@ class TasksTest(base.TestCase): self.image.canonical_name, decode=True, stream=True) self.assertTrue(pusher.success) - @mock.patch('docker.version', '3.0.0') @mock.patch.dict(os.environ, clear=True) @mock.patch('docker.APIClient') def test_push_image_failure(self, mock_client): @@ -95,7 +82,6 @@ class TasksTest(base.TestCase): self.assertFalse(pusher.success) self.assertEqual(build.Status.PUSH_ERROR, self.image.status) - @mock.patch('docker.version', '3.0.0') @mock.patch.dict(os.environ, clear=True) @mock.patch('docker.APIClient') def test_push_image_failure_retry(self, mock_client): @@ -116,7 +102,6 @@ class TasksTest(base.TestCase): self.assertTrue(pusher.success) self.assertEqual(build.Status.BUILT, self.image.status) - @mock.patch('docker.version', '3.0.0') @mock.patch.dict(os.environ, clear=True) @mock.patch('docker.APIClient') def test_push_image_failure_error(self, mock_client): @@ -131,7 +116,6 @@ class TasksTest(base.TestCase): self.assertFalse(pusher.success) self.assertEqual(build.Status.PUSH_ERROR, self.image.status) - @mock.patch('docker.version', '3.0.0') @mock.patch.dict(os.environ, clear=True) @mock.patch('docker.APIClient') def test_push_image_failure_error_retry(self, mock_client): |
