summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/cluster_tests.py
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-05-27 20:02:41 +0000
committerAlan Conway <aconway@apache.org>2010-05-27 20:02:41 +0000
commit148033c59cf1b1f36ec4e80eef6e5c9beb65577b (patch)
treec1239bd0c85d09f7ecd0247d7897f4f837276205 /qpid/cpp/src/tests/cluster_tests.py
parent9557857f8f36d2f942ee761d37234cd09e6c186a (diff)
downloadqpid-python-148033c59cf1b1f36ec4e80eef6e5c9beb65577b.tar.gz
Fixed: authentication with bad credentials causes cluster broker to exit.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@948969 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/cluster_tests.py')
-rwxr-xr-xqpid/cpp/src/tests/cluster_tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/cluster_tests.py b/qpid/cpp/src/tests/cluster_tests.py
index f36cde9ecc..02b3b29571 100755
--- a/qpid/cpp/src/tests/cluster_tests.py
+++ b/qpid/cpp/src/tests/cluster_tests.py
@@ -101,6 +101,18 @@ class ShortTests(BrokerTest):
assert readfile("direct.dump") == readfile("updatee.dump")
os.remove("direct.dump")
os.remove("updatee.dump")
+
+ def test_sasl(self):
+ """Test SASL authentication and encryption in a cluster"""
+ sasl_config=os.path.join(self.rootdir, "sasl_config")
+ cluster = self.cluster(3, ["--auth", "yes", "--sasl-config", sasl_config])
+ # Try a bad user ID
+ try:
+ c = messaging.Connection.establish("nosuch/user@%s"%(cluster[0].host_port()))
+ self.fail("Expected exception")
+ except messaging.exceptions.ConnectionError: pass
+ for b in cluster: b.ready() # Make sure all brokers still running.
+
class LongTests(BrokerTest):
"""Tests that can run for a long time if -DDURATION=<minutes> is set"""