diff options
| author | Sam Morrison <sorrison@gmail.com> | 2020-10-06 14:03:19 +1100 |
|---|---|---|
| committer | Sam Morrison <sorrison@gmail.com> | 2020-10-06 14:05:11 +1100 |
| commit | 17678c9bd6f3f4c5b9e7b5ceb27c2bd12493fba4 (patch) | |
| tree | 0506dbdd0ea5c3bac9b8362c6e4914aa0e20af6d /openstackclient/tests | |
| parent | 098a3fe2dea70eb16f13b717d62f51a4c890891d (diff) | |
| download | python-openstackclient-17678c9bd6f3f4c5b9e7b5ceb27c2bd12493fba4.tar.gz | |
Restore behavior of image create with same name.
With 60e7c51df4cf061ebbb435a959ad63c7d3a296bf the behaviour of
`openstack image create` changed so that you can't create an image
with the same name. This patch restores the previous functionality.
Story: 2008229
Task: 41069
Change-Id: Ia0f4920371a918e94d1ccf9fcfcbf90ff885a455
Diffstat (limited to 'openstackclient/tests')
| -rw-r--r-- | openstackclient/tests/unit/image/v2/test_image.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/openstackclient/tests/unit/image/v2/test_image.py b/openstackclient/tests/unit/image/v2/test_image.py index 310f6b76..b094817e 100644 --- a/openstackclient/tests/unit/image/v2/test_image.py +++ b/openstackclient/tests/unit/image/v2/test_image.py @@ -100,6 +100,7 @@ class TestImageCreate(TestImage): # ImageManager.create(name=, **) self.client.create_image.assert_called_with( name=self.new_image.name, + allow_duplicates=True, container_format=image.DEFAULT_CONTAINER_FORMAT, disk_format=image.DEFAULT_DISK_FORMAT, ) @@ -152,6 +153,7 @@ class TestImageCreate(TestImage): # ImageManager.create(name=, **) self.client.create_image.assert_called_with( name=self.new_image.name, + allow_duplicates=True, container_format='ovf', disk_format='ami', min_disk=10, @@ -239,6 +241,7 @@ class TestImageCreate(TestImage): # ImageManager.create(name=, **) self.client.create_image.assert_called_with( name=self.new_image.name, + allow_duplicates=True, container_format=image.DEFAULT_CONTAINER_FORMAT, disk_format=image.DEFAULT_DISK_FORMAT, is_protected=self.new_image.is_protected, @@ -246,7 +249,7 @@ class TestImageCreate(TestImage): Alpha='1', Beta='2', tags=self.new_image.tags, - filename=imagefile.name + filename=imagefile.name, ) self.assertEqual( @@ -288,6 +291,7 @@ class TestImageCreate(TestImage): # ImageManager.create(name=, **) self.client.create_image.assert_called_with( name=self.new_image.name, + allow_duplicates=True, container_format=image.DEFAULT_CONTAINER_FORMAT, disk_format=image.DEFAULT_DISK_FORMAT, use_import=True |
