Federation /protocols tests mistakenly use 'protocol_id' instead of 'id'

Bug #1453847 reported by Dolph Mathews on 2015-05-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dolph Mathews

Bug Description

The second paragraph of the keystone-wide API conventions asserts that "each resource contains a canonically unique identifier (ID) defined by the Identity service implementation and is provided as the id attribute":


Following in that spirit, the federation API specification asserts that every instance of a protocol reference should have an 'id' attribute which appears in the URL references as a 'protocol_id':


But the client unit tests create protocol references with a 'protocol_id' attribute instead of an 'id' attribute:


Fortunately, the server-side implementation appears to persist protocols correctly:


So, 'protocol_id' here should just be 'id', and all the dependent tests need to be revised:


Confirmed by Steve Martinelli.

Dolph Mathews (dolph) on 2015-05-11
tags: added: test-improvement

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

Changed in python-keystoneclient:
status: Confirmed → In Progress
Dolph Mathews (dolph) on 2015-05-11
description: updated

Reviewed: https://review.openstack.org/181945
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=3f757656a485d3cec1a56fe4d3f9f07a313a74c7
Submitter: Jenkins
Branch: master

commit 3f757656a485d3cec1a56fe4d3f9f07a313a74c7
Author: Dolph Mathews <email address hidden>
Date: Mon May 11 15:40:33 2015 +0000

    Use 'id' instead of 'protocol_id' in federation protocol tests

    The actual attribute returned in object references of the /protocols API
    is 'id', as in all other keystone APIs that return objects. The
    implementation of new_ref() here doesn't actually include an 'id'
    reference though, and goes out of it's way to test the wrong thing. This
    patch fix that, eliminates the workarounds, and does a touch of
    refactoring to bring these tests in line with tests of other client

    Change-Id: I9a272b3ef91934e780106d89b5091b4bfb87ad29
    Closes-Bug: 1453847

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Changed in python-keystoneclient:
milestone: none → 1.4.0
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers