You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2017/03/13 15:03:13 UTC
qpid-dispatch git commit: DISPATCH-631 - Tests made conditional to
skip tests for SASL features that are not available
Repository: qpid-dispatch
Updated Branches:
refs/heads/master 40b52d9fe -> d72f2278f
DISPATCH-631 - Tests made conditional to skip tests for SASL features that are not available
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/d72f2278
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/d72f2278
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/d72f2278
Branch: refs/heads/master
Commit: d72f2278f050d4aaaa2fa0163b72d8a4831eab60
Parents: 40b52d9
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Mon Mar 13 11:02:51 2017 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Mon Mar 13 11:02:51 2017 -0400
----------------------------------------------------------------------
tests/system_tests_deprecated.py | 7 ++++++
tests/system_tests_qdstat.py | 4 +++-
tests/system_tests_sasl_plain.py | 40 +++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/d72f2278/tests/system_tests_deprecated.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_deprecated.py b/tests/system_tests_deprecated.py
index 73c5f46..a81810b 100644
--- a/tests/system_tests_deprecated.py
+++ b/tests/system_tests_deprecated.py
@@ -21,6 +21,7 @@ import unittest, os
from system_test import TestCase, Qdrouterd, TIMEOUT
from system_tests_sasl_plain import RouterTestPlainSaslCommon
from qpid_dispatch.management.client import Node
+from proton import SASL
class RouterTestDeprecated(RouterTestPlainSaslCommon):
@@ -33,6 +34,9 @@ class RouterTestDeprecated(RouterTestPlainSaslCommon):
"""
super(RouterTestDeprecated, cls).setUpClass()
+ if not SASL.extended():
+ return
+
super(RouterTestDeprecated, cls).createSaslFiles()
cls.routers = []
@@ -93,6 +97,9 @@ class RouterTestDeprecated(RouterTestPlainSaslCommon):
Also makes sure that TLSv1/SSLv3 was used as sslProto
"""
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
+
local_node = Node.connect(self.routers[0].addresses[1], timeout=TIMEOUT)
# saslConfigName and saslConfigPath were set in the ContainerEntity. This tests makes sure that the
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/d72f2278/tests/system_tests_qdstat.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_qdstat.py b/tests/system_tests_qdstat.py
index d54f7df..7bd6049 100644
--- a/tests/system_tests_qdstat.py
+++ b/tests/system_tests_qdstat.py
@@ -22,7 +22,7 @@ import re
import system_test
import unittest
from subprocess import PIPE
-from proton import Url, SSLDomain, SSLUnavailable
+from proton import Url, SSLDomain, SSLUnavailable, SASL
class QdstatTest(system_test.TestCase):
"""Test qdstat tool output"""
@@ -342,6 +342,8 @@ try:
self.assertRaises(AssertionError, self.ssl_test, url_name, arg_names)
def test_ssl_cert_to_auth_fail_no_sasl_external(self):
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
self.ssl_test_bad('auth_s', ['client_cert_all'])
def test_ssl_trustfile_cert_to_auth_fail_no_sasl_external(self):
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/d72f2278/tests/system_tests_sasl_plain.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_sasl_plain.py b/tests/system_tests_sasl_plain.py
index 0e11dab..a180d80 100644
--- a/tests/system_tests_sasl_plain.py
+++ b/tests/system_tests_sasl_plain.py
@@ -21,6 +21,7 @@ import unittest, os, json
from subprocess import PIPE, Popen, STDOUT
from system_test import TestCase, Qdrouterd, main_module, DIR, TIMEOUT, Process
from qpid_dispatch.management.client import Node
+from proton import SASL
class RouterTestPlainSaslCommon(TestCase):
@@ -64,6 +65,9 @@ class RouterTestPlainSasl(RouterTestPlainSaslCommon):
"""
super(RouterTestPlainSasl, cls).setUpClass()
+ if not SASL.extended():
+ return
+
super(RouterTestPlainSasl, cls).createSaslFiles()
cls.routers = []
@@ -110,6 +114,10 @@ class RouterTestPlainSasl(RouterTestPlainSaslCommon):
somehow use SASL ANONYMOUS to connect to QDR.X
"""
+
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
+
p = self.popen(
['qdstat', '-b', str(self.routers[0].addresses[1]), '-c'],
name='qdstat-'+self.id(), stdout=PIPE, expect=None)
@@ -124,6 +132,10 @@ class RouterTestPlainSasl(RouterTestPlainSaslCommon):
"""
Make qdstat use sasl plain authentication.
"""
+
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
+
p = self.popen(
['qdstat', '-b', str(self.routers[0].addresses[2]), '-c', '--sasl-mechanisms=PLAIN',
'--sasl-username=test@domain.com', '--sasl-password=password'],
@@ -145,6 +157,9 @@ class RouterTestPlainSasl(RouterTestPlainSaslCommon):
"""
Make qdstat use sasl plain authentication with client password specified in a file.
"""
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
+
password_file = os.getcwd() + '/sasl-client-password-file.txt'
# Create a SASL configuration file.
with open(password_file, 'w') as sasl_client_password_file:
@@ -188,6 +203,9 @@ class RouterTestPlainSaslOverSsl(RouterTestPlainSaslCommon):
"""
super(RouterTestPlainSaslOverSsl, cls).setUpClass()
+ if not SASL.extended():
+ return
+
super(RouterTestPlainSaslOverSsl, cls).createSaslFiles()
cls.routers = []
@@ -243,6 +261,9 @@ class RouterTestPlainSaslOverSsl(RouterTestPlainSaslCommon):
"""
Make qdstat use sasl plain authentication over ssl.
"""
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
+
p = self.popen(
['qdstat', '-b', str(self.routers[0].addresses[2]), '-c',
# The following are SASL args
@@ -280,6 +301,9 @@ class RouterTestPlainSaslOverSsl(RouterTestPlainSaslCommon):
Also makes sure that TLSv1/SSLv3 was used as sslProto
"""
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
+
local_node = Node.connect(self.routers[0].addresses[1], timeout=TIMEOUT)
# sslProto should be TLSv1/SSLv3
@@ -310,6 +334,9 @@ class RouterTestVerifyHostNameYes(RouterTestPlainSaslCommon):
"""
super(RouterTestVerifyHostNameYes, cls).setUpClass()
+ if not SASL.extended():
+ return
+
super(RouterTestVerifyHostNameYes, cls).createSaslFiles()
cls.routers = []
@@ -368,6 +395,9 @@ class RouterTestVerifyHostNameYes(RouterTestPlainSaslCommon):
The connection to the other router will not happen because the connection failed
due to setting 'verifyHostName': 'yes'
"""
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
+
local_node = Node.connect(self.routers[1].addresses[0], timeout=TIMEOUT)
# There should be only two connections.
@@ -397,6 +427,9 @@ class RouterTestVerifyHostNameNo(RouterTestPlainSaslCommon):
"""
super(RouterTestVerifyHostNameNo, cls).setUpClass()
+ if not SASL.extended():
+ return
+
super(RouterTestVerifyHostNameNo, cls).createSaslFiles()
cls.routers = []
@@ -492,6 +525,9 @@ class RouterTestVerifyHostNameNo(RouterTestPlainSaslCommon):
"""
Tests to make sure that an inter-router connection exists between the routers since verifyHostName is 'no'.
"""
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
+
local_node = Node.connect(self.routers[1].addresses[0], timeout=TIMEOUT)
results = local_node.query(type='org.apache.qpid.dispatch.connection').results
@@ -505,6 +541,8 @@ class RouterTestVerifyHostNameNo(RouterTestPlainSaslCommon):
Re-add the deleted connector and associate it with an ssl profile and make sure
that the two routers are able to communicate over the connection.
"""
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
ssl_profile_name = 'client-ssl-profile'
@@ -542,6 +580,8 @@ class RouterTestVerifyHostNameNo(RouterTestPlainSaslCommon):
"""
Deletes a connector and its corresponding ssl profile and recreates both
"""
+ if not SASL.extended():
+ self.skipTest("Cyrus library not available. skipping test")
ssl_profile_name = 'client-ssl-profile'
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org