Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 41a78668f -> 7a8c2b9d4


DISPATCH-640 - Additional tests to make sure both containerId and connection 
cannot be specified in linkRoute/autoLink


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/7a8c2b9d
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/7a8c2b9d
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/7a8c2b9d

Branch: refs/heads/master
Commit: 7a8c2b9d4ffa7e337192d03331718f2d5e2925cd
Parents: 41a7866
Author: Ganesh Murthy <gmur...@redhat.com>
Authored: Wed Mar 1 13:57:47 2017 -0500
Committer: Ganesh Murthy <gmur...@redhat.com>
Committed: Wed Mar 1 13:57:47 2017 -0500

----------------------------------------------------------------------
 tests/system_tests_qdmanage.py | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7a8c2b9d/tests/system_tests_qdmanage.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_qdmanage.py b/tests/system_tests_qdmanage.py
index dde5df2..120e959 100644
--- a/tests/system_tests_qdmanage.py
+++ b/tests/system_tests_qdmanage.py
@@ -261,6 +261,19 @@ class QdmanageTest(TestCase):
         self.assertEqual(output[0]['dir'], "in")
         self.assertEqual(output[0]['prefix'], "xyz")
 
+    def test_specify_container_id_connection_link_route(self):
+        long_type = 'org.apache.qpid.dispatch.router.config.linkRoute'
+        create_command = 'CREATE --type=' + long_type + ' prefix=abc 
containerId=id1 connection=conn1 dir=out'
+        bad_create = False
+        try:
+            output = json.loads(self.run_qdmanage(create_command))
+            print output
+        except Exception as e:
+            bad_create = True
+            self.assertTrue("Both connection and containerId cannot be 
specified. Specify only one" in e.message)
+
+        self.assertTrue(bad_create)
+
     def test_check_auto_link_name(self):
         long_type = 'org.apache.qpid.dispatch.router.config.autoLink'
         query_command = 'QUERY --type=' + long_type
@@ -269,6 +282,19 @@ class QdmanageTest(TestCase):
         self.assertEqual(output[0]['dir'], "out")
         self.assertEqual(output[0]['addr'], "mnop")
 
+    def test_specify_container_id_connection_auto_link(self):
+        long_type = 'org.apache.qpid.dispatch.router.config.autoLink'
+        create_command = 'CREATE --type=' + long_type + ' addr=abc 
containerId=id1 connection=conn1 dir=out'
+        bad_create = False
+        try:
+            output = json.loads(self.run_qdmanage(create_command))
+            print output
+        except Exception as e:
+            bad_create = True
+            self.assertTrue("Both connection and containerId cannot be 
specified. Specify only one" in e.message)
+
+        self.assertTrue(bad_create)
+
     def test_create_delete_connector(self):
         long_type = 'org.apache.qpid.dispatch.connector'
         query_command = 'QUERY --type=' + long_type


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

Reply via email to