Glance needs a test for GET /

Bug #1579132 reported by Mark T. Voelker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
New
Undecided
Mark T. Voelker
defcore
New
Medium
Mark T. Voelker

Bug Description

A fundamental operation for most OpenStack services is providing information about what versions of an API are available to clients. A version document can be retrieved by sending an unauthenticated GET request to the root URL ("/") for most services, including Glance. This capability is important for discovery in that clients can learn how to interact with the cloud in question. DefCore considers it an important capability for interoperability and has added similar capabilities to it's Guidelines for other services.[1][2] With multiple API versions available across many clouds, being able to retrieve a version document will be increasingly important for clients. However, there are currently no tests for GET /, so DefCore cannot make this a required Capability. We should add a simple smoke test or two for GET /.

Note: a similar bug for Neutron [3] is being worked now; once it winds it's way through the review queue then it should be fairly simple to use much of the same logic for Glance.

[1] http://git.openstack.org/cgit/openstack/defcore/tree/2016.01.json#n117
[2] http://git.openstack.org/cgit/openstack/defcore/tree/2016.01.json#n1379
[3] https://bugs.launchpad.net/neutron/+bug/1577410

Changed in glance:
assignee: nobody → Mark T. Voelker (mvoelker)
Changed in defcore:
importance: Undecided → Medium
Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

Hi Mark,

We have the following in-tree test:

glance/tests/functional/test_api.py

    def test_get_root_path(self):
        """Assert GET / with `no Accept:` header.
        Verify version choices returned.
        Bug lp:803260 no Accept header causes a 500 in glance-api
        """
        path = 'http://%s:%d' % ('127.0.0.1', self.api_port)
        http = httplib2.Http()
        response, content = http.request(path, 'GET')
        self.assertEqual(300, response.status)
        self.assertEqual(self.versions_json, content)

Do you mean a tempest test? Thanks.

Revision history for this message
Mark T. Voelker (mvoelker) wrote :

Stuart: yes, a tempest test. This is per the TC resolution:

https://governance.openstack.org/resolutions/20160504-defcore-test-location.html

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.