ted-ross commented on a change in pull request #979:
URL: https://github.com/apache/qpid-dispatch/pull/979#discussion_r562734424



##########
File path: tests/system_tests_ssl.py
##########
@@ -452,6 +458,76 @@ def get_expected_tls_result(self, expected_results):
                 self.OPENSSL_ALLOW_TLSV1_2 and tlsv1_2,
                 self.OPENSSL_ALLOW_TLSV1_3 and tlsv1_3]
 
+    def inject_file(self, source_file, dest_file):
+        source_path = self.ssl_file(source_file)
+        url         = Url("amqp://0.0.0.0:%d" % self.PORT_CLEAR)
+        try:
+            connection = BlockingConnection(url, sasl_enabled=False, 
timeout=self.TIMEOUT)
+            sender     = connection.create_sender('_$qd.store_file')
+            fd         = open(source_path, "r")
+            body       = fd.read()
+            fd.close()
+            sender.send(Message(subject=dest_file, body=body))
+            connection.close()
+        except proton.Timeout:
+            return False
+        except proton.ConnectionException:
+            return False
+        except Exception as e:
+            print("Exception: %r" % e)
+            return False
+        return True
+
+    def create_ssl_profile(self, name, args):
+        url = Url("amqp://0.0.0.0:%d" % self.PORT_CLEAR)
+        try:
+            connection = BlockingConnection(url, sasl_enabled=False, 
timeout=self.TIMEOUT)
+            receiver   = connection.create_receiver(None, dynamic=True)
+            sender     = connection.create_sender('$management')
+            sender.send(Message(properties={'operation': 'CREATE',

Review comment:
       I didn't realize that QdManager spawns a subprocess to run the qdmanage 
cli.  That seems heavy-handed for a simple one-off request reply exchange.  I'm 
going to leave this code as-is.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to