diff options
| author | Dmitriy Rabotyagov <noonedeadpunk@ya.ru> | 2021-05-05 16:59:14 +0300 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2022-05-16 09:16:52 +0100 |
| commit | 5cc6fc2b88296035f687f72d92efe4a3cea78fc7 (patch) | |
| tree | 0a573286e3820cdf0d859b33f6beffdb519d4e0c /openstackclient/tests/functional/image | |
| parent | 4b97a8518146f1427090801e8535251545617de2 (diff) | |
| download | python-openstackclient-5cc6fc2b88296035f687f72d92efe4a3cea78fc7.tar.gz | |
Allow to filter multiple tags for image list
Currently in case of passing `--tag` several times, only last one will
be picked up for the filtering. In the meanwhile Glance allow option to
be repeated multiple times to filter based on the multiple tags.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/789827
Change-Id: I7379d0b0014f0e3d13b02ee5ec6b642a7a5aa7d1
Diffstat (limited to 'openstackclient/tests/functional/image')
| -rw-r--r-- | openstackclient/tests/functional/image/v2/test_image.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openstackclient/tests/functional/image/v2/test_image.py b/openstackclient/tests/functional/image/v2/test_image.py index 0a3a7360..5b074700 100644 --- a/openstackclient/tests/functional/image/v2/test_image.py +++ b/openstackclient/tests/functional/image/v2/test_image.py @@ -26,6 +26,7 @@ class ImageTests(base.BaseImageTests): self.name = uuid.uuid4().hex self.image_tag = 'my_tag' + self.image_tag1 = 'random' json_output = json.loads(self.openstack( '--os-image-api-version 2 ' 'image create -f json --tag {tag} {name}'.format( @@ -78,13 +79,18 @@ class ImageTests(base.BaseImageTests): def test_image_list_with_tag_filter(self): json_output = json.loads(self.openstack( - 'image list --tag ' + self.image_tag + ' --long -f json' + 'image list --tag ' + self.image_tag + ' --tag ' + + self.image_tag1 + ' --long -f json' )) for taglist in [img['Tags'] for img in json_output]: self.assertIn( self.image_tag, taglist ) + self.assertIn( + self.image_tag1, + taglist + ) def test_image_attributes(self): """Test set, unset, show on attributes, tags and properties""" |
