Fix the tempest test error

This patch fixed the tempest error in tempet_plugin.

Change-Id: I1706a812d251f3de2475286a46b525e7d1d1e78c
Closes-bug: #1547188
This commit is contained in:
wangxiyuan 2016-02-23 17:16:18 +08:00
parent 830c54dc55
commit 6ce2477eb1
4 changed files with 10 additions and 12 deletions

View File

@ -16,7 +16,7 @@
from oslo_config import cfg
service_option = cfg.BoolOpt('zaqar',
default=False,
default=True,
help="Whether or not Zaqar is expected to be "
"available"),

View File

@ -25,9 +25,9 @@ from zaqar.tests.tempest_plugin.api_schema.response.v1 import queues as schema
class MessagingClient(rest_client.RestClient):
def __init__(self, auth_provider, service, region,
endpoint_type=None, build_interval=None, build_timeout=None,
disable_ssl_certificate_validation=None, ca_certs=None,
trace_requests=None):
endpoint_type='publicURL', build_interval=1, build_timeout=60,
disable_ssl_certificate_validation=False, ca_certs=None,
trace_requests=''):
dscv = disable_ssl_certificate_validation
super(MessagingClient, self).__init__(
auth_provider, service, region,

View File

@ -62,27 +62,25 @@ class TestClaims(base.BaseMessagingTest):
# Delete Claimed message
self.client.delete_messages(claimed_message_uri)
@decorators.skip_because(bug="1331517")
@decorators.idempotent_id('84e491f4-68c6-451f-9846-b8f868eb27c5')
def test_query_claim(self):
# Post a Claim
resp, body = self._post_and_claim_messages(queue_name=self.queue_name)
# Query Claim
claim_uri = resp['location']
claim_uri = resp['location'][resp['location'].find('/v1'):]
self.client.query_claim(claim_uri)
# Delete Claimed message
claimed_message_uri = body[0]['href']
self.delete_messages(claimed_message_uri)
@decorators.skip_because(bug="1328111")
@decorators.idempotent_id('420ef0c5-9bd6-4b82-b06d-d9da330fefd3')
def test_update_claim(self):
# Post a Claim
resp, body = self._post_and_claim_messages(queue_name=self.queue_name)
claim_uri = resp['location']
claim_uri = resp['location'][resp['location'].find('/v1'):]
claimed_message_uri = body[0]['href']
# Update Claim
@ -104,7 +102,7 @@ class TestClaims(base.BaseMessagingTest):
def test_release_claim(self):
# Post a Claim
resp, body = self._post_and_claim_messages(queue_name=self.queue_name)
claim_uri = resp['location']
claim_uri = resp['location'][resp['location'].find('/v1'):]
# Release Claim
self.client.delete_claim(claim_uri)

View File

@ -43,7 +43,7 @@ class TestMessages(base.BaseMessagingTest):
resp, _ = self._post_messages()
# Get on the posted messages
message_uri = resp['location']
message_uri = resp['location'][resp['location'].find('/v1'):]
resp, _ = self.client.show_multiple_messages(message_uri)
# The test has an assertion here, because the response cannot be 204
# in this case (the client allows 200 or 204 for this API call).
@ -76,7 +76,7 @@ class TestMessages(base.BaseMessagingTest):
def test_get_multiple_messages(self):
# Post Messages
resp, _ = self._post_messages()
message_uri = resp['location']
message_uri = resp['location'][resp['location'].find('/v1'):]
# Get posted messages
resp, _ = self.client.show_multiple_messages(message_uri)
@ -103,7 +103,7 @@ class TestMessages(base.BaseMessagingTest):
def test_delete_multiple_messages(self):
# Post Messages
resp, _ = self._post_messages()
message_uri = resp['location']
message_uri = resp['location'][resp['location'].find('/v1'):]
# Delete multiple messages
self.client.delete_messages(message_uri)