From 8d2b8389cd64e096bf310419e5b309f3fa046602 Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Thu, 24 Aug 2017 16:14:36 -0400 Subject: [PATCH] Add mysql test --- novajoin_tempest_plugin/tests/scenario/novajoin_manager.py | 5 +++++ novajoin_tempest_plugin/tests/scenario/test_tripleo_tls.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/novajoin_tempest_plugin/tests/scenario/novajoin_manager.py b/novajoin_tempest_plugin/tests/scenario/novajoin_manager.py index c4bbced..ed41519 100644 --- a/novajoin_tempest_plugin/tests/scenario/novajoin_manager.py +++ b/novajoin_tempest_plugin/tests/scenario/novajoin_manager.py @@ -242,6 +242,11 @@ class NovajoinScenarioTest(manager.ScenarioTest): # TODO(alee) Get from hiera nova::migration::libvirt::listen_address return "16514" + def verify_mysql_tls_connection(self, user, host_ip): + cmd = "sudo mysql --ssl -e \"SHOW SESSION STATUS LIKE 'Ssl_version';\"" + result = self.execute_on_controller(user, host_ip, cmd) + self.assertTrue('TLS' in result) + def execute_on_controller(self, user, hostip, target_cmd): keypair = '/home/stack/.ssh/id_rsa' cmd = ['ssh', '-i', keypair, diff --git a/novajoin_tempest_plugin/tests/scenario/test_tripleo_tls.py b/novajoin_tempest_plugin/tests/scenario/test_tripleo_tls.py index e31b7a3..ffd4684 100644 --- a/novajoin_tempest_plugin/tests/scenario/test_tripleo_tls.py +++ b/novajoin_tempest_plugin/tests/scenario/test_tripleo_tls.py @@ -129,3 +129,8 @@ class TripleOTLSTest(novajoin_manager.NovajoinScenarioTest): hostport="{host}:{port}".format(host=compute_ip, port=libvirt_port) ) + + def test_mysql_tls_setup(self): + for controller in CONF.novajoin.tripleo_controllers: + controller_ip = self.get_overcloud_server_ip(controller) + self.verify_mysql_tls_connection('heat-admin', controller_ip)