Fix AMQP 1.0 functional and unit test failures

As a result of upgrading proton to 0.10, some behavioral changes have
triggerd failures in the gate.

This patch fixes a subprocess call and syntax error in the AMQP1.0 unit tests.

This patch also fixes the functional test setup script to correctly
configure olter versions of QPIDD.

Both these fixes are necessary to get the gate to pass.

Change-Id: I5ca8476999fc953688c76c302a59bedf70658c8b
Closes-Bug: #1494794
Closes-Bug: #1494918
This commit is contained in:
Kenneth Giusti 2015-09-11 11:13:45 -04:00
parent e9a1492b72
commit 4dbcfa6c96
2 changed files with 18 additions and 4 deletions

View File

@ -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')

View File

@ -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 <<EOF
auth=no
EOF
else
cat >> ${DATADIR}/qpidd.conf <<EOF
auth=yes
EOF
fi
if [ $PROTOCOL == "1" ]; then
cat >> ${DATADIR}/qpidd.conf <<EOF
# Used by AMQP1.0 only
@ -59,7 +73,7 @@ queue-patterns=exclusive
queue-patterns=unicast
topic-patterns=broadcast
EOF
# some versions of qpidd require this for AMQP 1 and SASL:
# versions of qpidd >0.32 require this for AMQP 1 and SASL:
if `$QPIDD --help | grep -q "sasl-service-name"`; then
cat >> ${DATADIR}/qpidd.conf <<EOF
sasl-service-name=amqp