Add websockets to our test suite

The base classes to test websockets were added but no tests were present
in the actual test suite. This patch adds the required packages, modules
and imports for that to work.

Change-Id: I2f3b222657555607133f7ccdb51914cf07248dc8
Partial-Implements: blueprint persistent-transport
This commit is contained in:
Flavio Percoco 2015-03-31 15:43:31 +02:00 committed by Victoria Martinez de la Cruz
parent 208dddaf5f
commit 7c7b13535f
4 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,25 @@
# Copyright (c) 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
from zaqar.tests.unit.transport.websocket import v1_1
# --------------------------------------------------------------------------
# Identical or just minor variations across versions
# --------------------------------------------------------------------------
# TODO(kgriffs): Having to list a separate test for each backend is
# sort of a pain; is there a better way?
class TestQueueLifecycleMongoDB(v1_1.TestQueueLifecycleMongoDB):
pass

View File

@ -0,0 +1,17 @@
# Copyright (c) 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
from zaqar.tests.unit.transport.websocket.v1_1 import test_queue_lifecycle as l
TestQueueLifecycleMongoDB = l.TestQueueLifecycleMongoDB

View File

@ -567,11 +567,14 @@ class QueueLifecycleBaseTest(base.V1_1Base):
self.protocol.onMessage(req, False)
@testing.requires_mongodb
class TestQueueLifecycleMongoDB(QueueLifecycleBaseTest):
config_file = 'websocket_mongodb.conf'
@testing.requires_mongodb
def setUp(self):
super(TestQueueLifecycleMongoDB, self).setUp()
def tearDown(self):
storage = self.boot.storage._storage
connection = storage.connection