Test allow creation of service without type

Bug #1394995 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
New
Undecided
Lin Hua Cheng

Bug Description

Test in test_catalog and test_v3_catalog, allow service to be created without a type. According to the API specs, service type is a required
field for Service.

https://github.com/openstack/keystone/blob/master/keystone/tests/test_catalog.py#L134

        service = {'id': self.service_id, 'name': uuid.uuid4().hex}
        self.catalog_api.create_service(self.service_id, service)

This mean the api service is not validating the type is required OR we are not testing that service validates it.

Changed in keystone:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
description: updated
Revision history for this message
David Stanek (dstanek) wrote :

I just took a quick look at the code and it looks like this is just a disconnect between the controller and backends. The controller seems to validate this properly using a JSON schema. The backends do no such validation. I guess the question is if they should validate or not...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/136881

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.