[openstack-dev] [qa][keystone] Help with XML Tempest API tests
Sean Dague
sean at dague.net
Fri Nov 1 10:25:29 UTC 2013
On 11/01/2013 04:58 AM, Steven Hardy wrote:
> On Thu, Oct 31, 2013 at 09:40:46PM -0400, Adam Young wrote:
> <snip>
>> I think it is safe to say that the trusts API is broken in XML. I
>> added the following test:
>>
>> diff --git a/keystone/tests/test_v3_auth.py b/keystone/tests/test_v3_auth.py
>> index c0e191b..6a0c10c 100644
>> --- a/keystone/tests/test_v3_auth.py
>> +++ b/keystone/tests/test_v3_auth.py
>> @@ -2238,3 +2238,7 @@ class TestTrustAuth(TestAuthInfo):
>> self.get('/OS-TRUST/trusts?trustor_user_id=%s' %
>> self.user_id, expected_status=401,
>> token=trust_token)
>> +
>> +
>> +class TestTrustAuthXML(TestTrustAuth):
>> + content_type = 'xml'
>>
>> And, when running it, I got:
>>
>>
>> Ran 24 tests in 5.832s
>>
>> FAILED (SKIP=1, errors=12)
>>
>>
>> https://bugs.launchpad.net/keystone/+bug/1246941
>
> Great (well not great that we have a bug, but great that all this effort
> going into testing is finding some real bugs! :) )
>
> I notice there's a review associated with that bug, but I can't view it -
> if it's draft can you please add me to the reviewers list?
>
> Looking forward to seeing the patch, as you said the unit test examples
> should help me complete my Tempest patch.
>
> Also note I raised:
>
> https://bugs.launchpad.net/keystone/+bug/1246831
>
> Which seems somewhat related to this (we get a 500 with the XML encoded
> expires_at=None, which results in a zero-length string, so the trust
> controller treats it as a valid timestamp instead of ignoring it)
>
> I was planning to send a patch for the latter, but seems like it may
> overlap with your XML fixes, so I'll hold off for now.
My experience with the nova API and adding XML testing is that any
service's XML API is broken by default (because the underlying logic is
pretty JSON skewed, and the python clients talk JSON). So this isn't
very surprising. Thanks again for diving into it!
Honestly, one of these days we should have another serious conversation
about dropping XML entirely again (across all projects). A single data
payload that works is way better than additional payloads that don't.
-Sean
--
Sean Dague
http://dague.net
More information about the OpenStack-dev
mailing list