From 97abad9108859b867eaf394ea32291ad8053f825 Mon Sep 17 00:00:00 2001 From: "wander.way" Date: Thu, 16 Nov 2017 22:09:44 +0800 Subject: [PATCH] Remove the ambiguous test If Zaqar is deployed under Apache, the empty input negative check will return UnexpectedContentType which is not 405 error. This patch remove this ambiguous test. Change-Id: Ic384cd51581f0ad024bd2033eb9e00d022e253d4 --- zaqar_tempest_plugin/tests/v2/test_messages_negative.py | 3 ++- zaqar_tempest_plugin/tests/v2/test_queues_negative.py | 9 --------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/zaqar_tempest_plugin/tests/v2/test_messages_negative.py b/zaqar_tempest_plugin/tests/v2/test_messages_negative.py index a3d856e..22e0a5d 100644 --- a/zaqar_tempest_plugin/tests/v2/test_messages_negative.py +++ b/zaqar_tempest_plugin/tests/v2/test_messages_negative.py @@ -581,7 +581,8 @@ class TestMessagesNegative(base.BaseV2MessagingTest): # Pop value must be at least 1 and may not be greater than 20 queue_name = self.queues[data_utils.rand_int_id(0, len(self.queues) - 1)] - value = ' ' + # Use url code here to avoid Apache error. + value = '%20' uri = "/v2/queues/{0}/messages?pop={1}".format(queue_name, value) self.assertRaises(lib_exc.BadRequest, self.client.delete_messages, uri) diff --git a/zaqar_tempest_plugin/tests/v2/test_queues_negative.py b/zaqar_tempest_plugin/tests/v2/test_queues_negative.py index 7156f52..5cea753 100644 --- a/zaqar_tempest_plugin/tests/v2/test_queues_negative.py +++ b/zaqar_tempest_plugin/tests/v2/test_queues_negative.py @@ -43,15 +43,6 @@ class QueueNegativeTestJSON(base.BaseV2MessagingTest): self.client.create_queue, queue_name) - @decorators.attr(type=['negative']) - @decorators.idempotent_id('639206ad-d74c-4f51-895d-76e2c7dff60b') - def test_queue_name_is_not_specified(self): - # Length of queue name should >= 1 and <=64 bytes - queue_name = ' ' - self.assertRaises(lib_exc.UnexpectedResponseCode, - self.client.create_queue, - queue_name) - @decorators.attr(type=['negative']) @decorators.idempotent_id('3ca0e180-c770-4922-8a48-9563c484aaed') def test_queue_name_has_a_invalid_character_set(self):