diff --git a/oslo_messaging/tests/test_amqp_driver.py b/oslo_messaging/tests/test_amqp_driver.py index 8e39a3ad..6955658e 100644 --- a/oslo_messaging/tests/test_amqp_driver.py +++ b/oslo_messaging/tests/test_amqp_driver.py @@ -371,11 +371,11 @@ class TestCyrusAuthentication(test_utils.BaseTestCase): _t = "echo secret | saslpasswd2 -c -p -f ${db} joe" cmd = Template(_t).substitute(db=db) try: - subprocess.call(args=cmd, shell=True) + subprocess.check_call(args=cmd, shell=True) except Exception: shutil.rmtree(self._conf_dir, ignore_errors=True) self._conf_dir = None - raise self.SkipTest("Cyrus tool saslpasswd2 not installed") + raise self.skip("Cyrus tool saslpasswd2 not installed") # configure the SASL broker: conf = os.path.join(self._conf_dir, 'openstack.conf') diff --git a/setup-test-env-qpid.sh b/setup-test-env-qpid.sh index 9c0e38d5..099ceb7a 100755 --- a/setup-test-env-qpid.sh +++ b/setup-test-env-qpid.sh @@ -48,10 +48,24 @@ acl-file=${DATADIR}/qpidd.acl sasl-config=${DATADIR}/sasl2 ${LIBACL} mgmt-enable=yes -auth=yes log-to-stderr=no EOF +# sadly, older versions of qpidd (<=0.32) cannot authenticate against +# newer versions of proton (>=0.10). If this version of qpidd does +# not support the fix, then do not require authentication + +if [ $PROTOCOL == "1" ] && ! `$QPIDD --help | grep -q "sasl-service-name"`; then + echo "This version of $QPIDD does not support SASL authentication with AMQP 1.0" + cat >> ${DATADIR}/qpidd.conf <> ${DATADIR}/qpidd.conf <> ${DATADIR}/qpidd.conf <0.32 require this for AMQP 1 and SASL: if `$QPIDD --help | grep -q "sasl-service-name"`; then cat >> ${DATADIR}/qpidd.conf <