diff options
author | Alan Conway <aconway@apache.org> | 2010-05-27 20:02:41 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-05-27 20:02:41 +0000 |
commit | 9e82faab313bab906dc1e6e2dda02b4db9dbf993 (patch) | |
tree | 94a61638d14d20588414b3fe1386518d07c76f46 /cpp/src/tests/cluster_tests.py | |
parent | b0ed6faecb9d7dbbe91ac39af6bbdc2ad412253c (diff) | |
download | qpid-python-9e82faab313bab906dc1e6e2dda02b4db9dbf993.tar.gz |
Fixed: authentication with bad credentials causes cluster broker to exit.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@948969 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/cluster_tests.py')
-rwxr-xr-x | cpp/src/tests/cluster_tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/tests/cluster_tests.py b/cpp/src/tests/cluster_tests.py index f36cde9ecc..02b3b29571 100755 --- a/cpp/src/tests/cluster_tests.py +++ b/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""" |