Add tests that use parameters on GET functions

Bug #1086590 reported by Matthew Treinish
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
Castulo J. Martinez

Bug Description

There are GET methods in some of the clients that take in an optional 'params' parameter. However it doesn't appear that this is actually used in any tests. I found a few bugs in the param list url generation code in these methods which were not shown during runs because this code is never getting used.

Grepping for params=None in tempest/services yielded this list of methods: (ideally we should add a test that uses params for each method listed here)

compute/json/volumes_extensions_client.py: def list_volumes(self, params=None):
compute/json/volumes_extensions_client.py: def list_volumes_with_detail(self, params=None):
compute/json/security_groups_client.py: def list_security_groups(self, params=None):
compute/json/flavors_client.py: def list_flavors(self, params=None):
compute/json/flavors_client.py: def list_flavors_with_detail(self, params=None):
compute/json/images_client.py: def list_images(self, params=None):
compute/json/images_client.py: def list_images_with_detail(self, params=None):
compute/json/servers_client.py: def list_servers(self, params=None):
compute/json/servers_client.py: def list_servers_with_detail(self, params=None):
compute/json/floating_ips_client.py: def list_floating_ips(self, params=None):
compute/xml/volumes_extensions_client.py: def list_volumes(self, params=None):
compute/xml/volumes_extensions_client.py: def list_volumes_with_detail(self, params=None):
compute/xml/security_groups_client.py: def list_security_groups(self, params=None):
compute/xml/flavors_client.py: def list_flavors(self, params=None):
compute/xml/flavors_client.py: def list_flavors_with_detail(self, params=None):
compute/xml/images_client.py: def list_images(self, params=None):
compute/xml/images_client.py: def list_images_with_detail(self, params=None):
compute/xml/servers_client.py: def list_servers(self, params=None):
compute/xml/servers_client.py: def list_servers_with_detail(self, params=None):
compute/xml/floating_ips_client.py: def list_floating_ips(self, params=None):
object_storage/account_client.py: def list_account_containers(self, params=None):
object_storage/container_client.py: def list_all_container_objects(self, container, params=None):
object_storage/container_client.py: def list_container_contents(self, container, params=None):
volume/json/volumes_client.py: def list_volumes(self, params=None):
volume/json/volumes_client.py: def list_volumes_with_detail(self, params=None):
volume/xml/volumes_client.py: def list_volumes(self, params=None):
volume/xml/volumes_client.py: def list_volumes_with_detail(self, params=None):

tags: added: low-hanging-fruit test-needed
Changed in tempest:
importance: Undecided → Medium
status: New → Triaged
Changed in tempest:
assignee: nobody → Attila Fazekas (afazekas)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/22796
Committed: http://github.com/openstack/tempest/commit/11795b56868327318030cdcd94d3113001d958a3
Submitter: Jenkins
Branch: master

commit 11795b56868327318030cdcd94d3113001d958a3
Author: Attila Fazekas <email address hidden>
Date: Sun Feb 24 15:49:08 2013 +0100

    Add basic image filtering tests

    * Add service method: detailed listing
    * Add test case: filtering by name
    * Add test case: filtering by size (min, max)
    * Add test case: filter by disk format
    * Add test case: filter by container_type
    * Add test case: Ordering by size

    Partially fixes bug #1086590.

    Change-Id: Ia4d12a9d77ecf5cfd8552747b563c4d9da83c6b6

Changed in tempest:
status: In Progress → Fix Released
Changed in tempest:
status: Fix Released → In Progress
Changed in tempest:
status: In Progress → Confirmed
assignee: Attila Fazekas (afazekas) → nobody
Changed in tempest:
assignee: nobody → Shrikant Chaudhari (shripune)
Changed in tempest:
assignee: Shrikant Chaudhari (shripune) → nobody
Revision history for this message
Rohit Karajgi (rohitk) wrote :

I took a quick relook at the code to check the current status of this bug.
The following GET API that accept 'params' do not have tests (count reduced from earlier):

1. compute/json/volumes_extensions_client.py
list_volumes(self, params=None)
list_volumes_with_detail(self, params=None)

2. compute/json/images_client.py
list_images(self, params=None)
list_images_with_detail(self, params=None)

3. compute/json/security_groups_client.py
list_security_groups(self, params=None)

4. compute/json/floating_ips_client.py
list_floating_ips(self, params=None)

5. image/v2/json/image_client.py
image_list(self, params=None)

6. volume/json/volumes_client
list_volumes_with_detail(self, params=None)

7. volume/json/admin/volume_types_client
list_volume_types(self, params=None)

8. volume/json/admin/volume_types_client.
list_volume_types_extra_specs(self, vol_type_id, params=None)

9. volume/json/snapshots_client
list_snapshots(self, params=None):

10. volume/json/snapshots_client
list_snapshot_with_detail(self, params=None)

11. orchestration/json/orchestration_client
list_stacks(self, params=None)

Revision history for this message
Rohit Karajgi (rohitk) wrote :

...and the corresponding XML tests.

Changed in tempest:
assignee: nobody → Noorul Islam K M (noorul)
Changed in tempest:
assignee: Noorul Islam K M (noorul) → nobody
Changed in tempest:
assignee: nobody → Abhijeet Malawade (abhijeet-malawade)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/47078

Changed in tempest:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/47079

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/60747

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/47078
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=5945ffecd7b66cce955a0ffc92ac0d07e13acdc3
Submitter: Jenkins
Branch: master

commit 5945ffecd7b66cce955a0ffc92ac0d07e13acdc3
Author: Abhijeet Malawade <email address hidden>
Date: Tue Sep 17 05:54:44 2013 -0700

    Add testcases for volume

    Adds tests for those GET API functions that accept params

    List_volumes and list_volumes_with_detail for nova volume extension
    List_volumes and list_volumes_with_detail for Cinder API
    List_snapshots and list_snapshots_with_detail for Cinder API
    Fixed typo in volume snapshot json client to make it consistent
    with the corresponding xml client method "list_snapshots_with_detail"

    Partial-Bug: #1086590

    Change-Id: Ie703fa8729d838203c12293a7ce1ce942ec83a81

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/60747
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=3e067380115f187a3195e17df8dbebdab32f3823
Submitter: Jenkins
Branch: master

commit 3e067380115f187a3195e17df8dbebdab32f3823
Author: Abhijeet Malawade <email address hidden>
Date: Sun Dec 8 21:54:56 2013 -0800

    Add testcases for security groups

    Adds tests for those GET API functions that accept params

    List_security_groups Nova API

    Skip security groups list by 'all_tenants' search filter test
    if neutron is enabled because neutron do not support 'all_tenants'
    search filter.

    Change-Id: I5867acd03c3d184911281c673ce804455f269f57
    Partial-Bug: #1086590

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/47079
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=f268d8e8865958b68e1c4c440a7d785be0cd3bed
Submitter: Jenkins
Branch: master

commit f268d8e8865958b68e1c4c440a7d785be0cd3bed
Author: Abhijeet Malawade <email address hidden>
Date: Tue Sep 17 06:20:23 2013 -0700

    Add testcases for images

    Adds tests for those GET API functions that accept params

    Image_list glance API

    Partial-Bug: #1086590

    Change-Id: I9e2c5df63b066dd79ad8f5467b40bf3d6e252e98

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/216662

Changed in tempest:
assignee: Abhijeet Malawade (abhijeet-malawade) → Pranali Deore (pranali-deore)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/316182

Changed in tempest:
assignee: Pranali Deore (pranali-deore) → Castulo J. Martinez (castulo-martinez)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/317088

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/318259

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by Ken'ichi Ohmichi (<email address hidden>) on branch: master
Review: https://review.openstack.org/216662
Reason: As http://lists.openstack.org/pipermail/openstack-dev/2016-May/096204.html , we start abandoning patches have gotten old without any updating after negative feedback. Please restore if necessary to restart this again.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/318259
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=947d23344c35347d44dc85dbcd699333e3004ad8
Submitter: Jenkins
Branch: master

commit 947d23344c35347d44dc85dbcd699333e3004ad8
Author: Castulo J. Martinez <email address hidden>
Date: Wed May 18 10:41:00 2016 -0700

    Add missing test for the object storage v1 API

    This commit adds a missing test case for the object storage v1 API,
    the missing test is for listing account containers filtering the list
    using the prefix parameter.

    Change-Id: Icaf73aa88d86f92a09ff912148478031d487768b
    Partial-Bug: 1086590

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/325516

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/316182
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=0a592b48833dc8f54a53699053413c5633c3d7fb
Submitter: Jenkins
Branch: master

commit 0a592b48833dc8f54a53699053413c5633c3d7fb
Author: Castulo J. Martinez <email address hidden>
Date: Fri May 13 09:15:23 2016 -0700

    Add missing tests for the identity v3 API

    This commit adds missing test cases for the identity v3 API
    considering the use of parameters on Keystone GET functions

    Change-Id: Ic9c74ab6e9d30fbed3fead44ecfd1e23910db8b2
    Partial-Bug: 1086590

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by Castulo J. Martinez (<email address hidden>) on branch: master
Review: https://review.openstack.org/325516
Reason: Since there is no interest into keeping Heat tests in Tempest any more this patch is no longer needed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/317088
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=e9c8ce843a0062db4663cbab9705a7f10da55a7b
Submitter: Jenkins
Branch: master

commit e9c8ce843a0062db4663cbab9705a7f10da55a7b
Author: Castulo J. Martinez <email address hidden>
Date: Mon May 16 07:55:53 2016 -0700

    Add missing tests for the image v2 API

    This commit adds missing test cases for the image v2 API, the missing
    test cases are for listing images using different parameters for
    filtering the lists.

    This commit also fixes one test which was attempting to validate the
    use of the container_format filter using a value that was not found
    in the test environment.

    Change-Id: Ia1369fa73f56ec290e868d3f2f2873785a70951d
    Closes-Bug: 1086590

Changed in tempest:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.