You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2015/07/27 23:50:37 UTC

qpid-proton git commit: PROTON-923: Added some more test and fixed tests to work with default SASL impl

Repository: qpid-proton
Updated Branches:
  refs/heads/master 236ee166e -> 66cef4a31


PROTON-923: Added some more test and fixed tests to work with default SASL impl


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/66cef4a3
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/66cef4a3
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/66cef4a3

Branch: refs/heads/master
Commit: 66cef4a31f9411619a2febf8bcb2c96b971c89ea
Parents: 236ee16
Author: Andrew Stitcher <as...@apache.org>
Authored: Mon Jul 27 17:49:39 2015 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Mon Jul 27 17:49:39 2015 -0400

----------------------------------------------------------------------
 tests/python/proton_tests/sasl.py | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/66cef4a3/tests/python/proton_tests/sasl.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/sasl.py b/tests/python/proton_tests/sasl.py
index d24c11a..f93eef9 100644
--- a/tests/python/proton_tests/sasl.py
+++ b/tests/python/proton_tests/sasl.py
@@ -459,6 +459,7 @@ class SASLEventTest(engine.CollectorTest):
     self.collector = Collector()
 
   def testNormalAuthenticationClient(self):
+    common.ensureCanTestExtendedSASL()
     self.c1.collect(self.collector)
     self.t1.bind(self.c1)
     self.t2.bind(self.c2)
@@ -468,6 +469,7 @@ class SASLEventTest(engine.CollectorTest):
                 Event.CONNECTION_REMOTE_OPEN)
 
   def testNormalAuthenticationServer(self):
+    common.ensureCanTestExtendedSASL()
     self.c2.collect(self.collector)
     self.t1.bind(self.c1)
     self.t2.bind(self.c2)
@@ -477,6 +479,7 @@ class SASLEventTest(engine.CollectorTest):
                 Event.CONNECTION_REMOTE_OPEN)
 
   def testFailedAuthenticationClient(self):
+    common.ensureCanTestExtendedSASL()
     clientUser = "usr@proton"
     self.c1.user = clientUser
     self.c1.collect(self.collector)
@@ -489,6 +492,7 @@ class SASLEventTest(engine.CollectorTest):
                 Event.TRANSPORT_ERROR, Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_CLOSED)
 
   def testFailedAuthenticationServer(self):
+    common.ensureCanTestExtendedSASL()
     clientUser = "usr@proton"
     self.c1.user = clientUser
     self.c2.collect(self.collector)
@@ -501,6 +505,7 @@ class SASLEventTest(engine.CollectorTest):
                 Event.TRANSPORT_ERROR, Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_CLOSED)
 
   def testNoMechClient(self):
+    common.ensureCanTestExtendedSASL()
     self.c1.collect(self.collector)
     self.s2.allowed_mechs('IMPOSSIBLE')
     self.t1.bind(self.c1)
@@ -512,6 +517,7 @@ class SASLEventTest(engine.CollectorTest):
                 Event.TRANSPORT_ERROR, Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_CLOSED)
 
   def testNoMechServer(self):
+    common.ensureCanTestExtendedSASL()
     self.c2.collect(self.collector)
     self.s2.allowed_mechs('IMPOSSIBLE')
     self.t1.bind(self.c1)
@@ -541,3 +547,23 @@ class SASLEventTest(engine.CollectorTest):
                 Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
                 Event.TRANSPORT_TAIL_CLOSED,
                 Event.TRANSPORT_ERROR, Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_CLOSED)
+
+  def testDisallowedPlainClient(self):
+    self.c1.collect(self.collector)
+    self.t1.bind(self.c1)
+    self.t2.bind(self.c2)
+    _testSaslMech(self, 'PLAIN', authenticated=False)
+    self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
+                Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
+                Event.TRANSPORT_TAIL_CLOSED,
+                Event.TRANSPORT_ERROR, Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_CLOSED)
+
+  def testDisallowedPlainServer(self):
+    self.c2.collect(self.collector)
+    self.t1.bind(self.c1)
+    self.t2.bind(self.c2)
+    _testSaslMech(self, 'PLAIN', authenticated=False)
+    self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
+                Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
+                Event.TRANSPORT_TAIL_CLOSED,
+                Event.TRANSPORT_ERROR, Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_CLOSED)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org