Browse Source

Gate functionnal testing improvements

set DEVSTACK_GATE_NO_SERVICES=1 to not setup a whole openstack
when we need only a messaging broker.

Add of the zeromq gate job.

Fix the amqp1.0 password

Change-Id: If1332d97c4d4e92bf920fed4de2795461d9feb22
changes/65/151565/8
Mehdi Abaakouk 6 years ago
parent
commit
b6a1ea0113
3 changed files with 28 additions and 5 deletions
  1. +19
    -4
      oslo_messaging/tests/functional/gate/gate_hook.sh
  2. +3
    -0
      oslo_messaging/tests/functional/utils.py
  3. +6
    -1
      tox.ini

+ 19
- 4
oslo_messaging/tests/functional/gate/gate_hook.sh View File

@ -16,22 +16,37 @@
RPC_BACKEND=$1
DEVSTACK_LOCAL_CONFIG=$'QPID_USERNAME=stackqpid\n'
DEVSTACK_LOCAL_CONFIG+=$'QPID_PASSWORD=secretqpid\n'
DEVSTACK_LOCAL_CONFIG+=$'RABBIT_USERID=stackrabbit\n'
DEVSTACK_LOCAL_CONFIG+=$'RABBIT_PASSWORD=secretrabbit\n'
DEVSTACK_LOCAL_CONFIG=""
case $RPC_BACKEND in
rabbit)
DEVSTACK_LOCAL_CONFIG+=$'RABBIT_HOST=127.0.0.1\n'
DEVSTACK_LOCAL_CONFIG+=$'RABBIT_USERID=stackrabbit\n'
DEVSTACK_LOCAL_CONFIG+=$'RABBIT_PASSWORD=secretrabbit\n'
;;
qpid)
export DEVSTACK_GATE_QPID=1
DEVSTACK_LOCAL_CONFIG+=$'QPID_HOST=127.0.0.1\n'
DEVSTACK_LOCAL_CONFIG+=$'QPID_USERNAME=stackqpid\n'
DEVSTACK_LOCAL_CONFIG+=$'QPID_PASSWORD=secretqpid\n'
;;
amqp1)
export DEVSTACK_GATE_QPID=1
DEVSTACK_LOCAL_CONFIG+=$'QPID_HOST=127.0.0.1\n'
DEVSTACK_LOCAL_CONFIG+=$'QPID_USERNAME=stackqpid\n'
DEVSTACK_LOCAL_CONFIG+=$'QPID_PASSWORD=secretqpid\n'
DEVSTACK_LOCAL_CONFIG+=$'RPC_MESSAGING_PROTOCOL=AMQP1\n'
;;
zeromq)
export DEVSTACK_GATE_ZEROMQ=1
DEVSTACK_LOCAL_CONFIG+=$'ZEROMQ_MATCHMAKER=redis\n'
DEVSTACK_LOCAL_CONFIG+=$'MATCHMAKER_REDIS_HOST=127.0.0.1\n'
;;
esac
export DEVSTACK_LOCAL_CONFIG
export DEVSTACK_GATE_INSTALL_TESTONLY=1
export DEVSTACK_GATE_NO_SERVICES=1
export KEEP_LOCALRC=1
$BASE/new/devstack-gate/devstack-vm-gate.sh

+ 3
- 0
oslo_messaging/tests/functional/utils.py View File

@ -270,6 +270,9 @@ class SkipIfNoTransportURL(test_utils.BaseTestCase):
self.url = os.environ.get('TRANSPORT_URL')
if not self.url:
self.skipTest("No transport url configured")
zmq_matchmaker = os.environ.get('ZMQ_MATCHMAKER')
if zmq_matchmaker:
self.conf.rpc_zmq_matchmaker = zmq_matchmaker
class NotificationFixture(fixtures.Fixture):


+ 6
- 1
tox.ini View File

@ -40,13 +40,18 @@ setenv = TRANSPORT_URL=rabbit://stackrabbit:secretrabbit@127.0.0.1//
commands = python setup.py testr --slowest --testr-args='oslo_messaging.tests.functional'
[testenv:py27-func-amqp1]
setenv = TRANSPORT_URL=amqp://stackqpid:secretamqp1@127.0.0.1//
setenv = TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1//
deps = -r{toxinidir}/amqp1-requirements.txt
{[testenv]deps}
# NOTE(sileht): until ubuntu get proto packages, we run amqp_driver tests here
# because this is the only target to run fedora 20 in gate
commands = python setup.py testr --slowest --testr-args='oslo_messaging.tests.(functional|test_amqp_driver)'
[testenv:py27-func-zeromq]
setenv = TRANSPORT_URL=zmq://
ZMQ_MATCHMAKER=oslo_messaging._drivers.matchmaker_redis.MatchMakerRedis
commands = python setup.py testr --slowest --testr-args='oslo_messaging.tests.functional'
[flake8]
show-source = True
ignore = H237,H402,H405,H904


Loading…
Cancel
Save