ted-ross commented on a change in pull request #979:
URL: https://github.com/apache/qpid-dispatch/pull/979#discussion_r556843612
##########
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))
Review comment:
That would definitely be the right way to go for a production tool.
This was an easy way to upload those files for the test. I didn't feel the
need to overly optimize the test code.
----------------------------------------------------------------
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]