From 883311d64fd749315ee3639bff6c730e86026ac5 Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Thu, 3 Jul 2014 13:13:10 -0700 Subject: [PATCH] Re-enable 'check_trust_roles' Re-enable the 'check_trust_roles' method. This can be merged after the patches for change id I13ce159cbe9739d4bf5d321fc4bd069245f32734 are merged (master and stable/icehouse for Keystone). This changeset updates the new location for the check_trust_role HTTP status validation (in services/identity/v3/json/identity_client.py). Previously this was located in identity/admin/v3/test_trusts.py. Commented code indicating the above location change occurred has been removed. Change-Id: If1b7f18d7a357f4b3a4b478e300a17f2cc4a6159 Closes-Bug: #1334368 --- tempest/api/identity/admin/v3/test_trusts.py | 7 ------- tempest/services/identity/v3/json/identity_client.py | 5 +---- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py index fed517181d..1561a6e3ce 100644 --- a/tempest/api/identity/admin/v3/test_trusts.py +++ b/tempest/api/identity/admin/v3/test_trusts.py @@ -150,7 +150,6 @@ class BaseTrustsV3Test(base.BaseIdentityV3AdminTest): self.assertNotIn('v3/roles/%s' % self.not_delegated_role_id, role['links']['self']) - @test.skip_because(bug='1334368') def check_trust_roles(self): # Check we find the delegated role _, roles_get = self.trustor_client.get_trust_roles( @@ -164,12 +163,6 @@ class BaseTrustsV3Test(base.BaseIdentityV3AdminTest): _, role_get = self.trustor_client.check_trust_role( self.trust_id, self.delegated_role_id) - # This tempest two-step change conflicted with the change - # moving response checking to the client. This test should be - # re-enabled by removing the following assert and changing - # the response code in tempest/services/identity/v3/json/ - # identity_client.py in the check_trust_role_method. - # self.assertEqual('200', resp['status']) # And that we don't find not_delegated_role self.assertRaises(exceptions.NotFound, diff --git a/tempest/services/identity/v3/json/identity_client.py b/tempest/services/identity/v3/json/identity_client.py index 8c72dfaeaa..939399b733 100644 --- a/tempest/services/identity/v3/json/identity_client.py +++ b/tempest/services/identity/v3/json/identity_client.py @@ -498,10 +498,7 @@ class IdentityV3ClientJSON(rest_client.RestClient): """HEAD Check if role is delegated by a trust.""" resp, body = self.head("OS-TRUST/trusts/%s/roles/%s" % (trust_id, role_id)) - # This code needs to change to 200 when the keystone changes - # for bug 1334368 merge and check_trust_roles test is - # unskipped - self.expected_success(204, resp.status) + self.expected_success(200, resp.status) return resp, body