def test_extensions_http(self): # HTTP download # expect to find downloading extensions in to folder # expect to see Connect start try: # wait for extensions download message DockerUtil.wait_for_log_message([self.container], "Downloading extensions at", self.max_wait_time) DockerUtil.wait_for_log_message([self.container], "Unzipping contents of", self.max_wait_time) # Verify plugin.xml file for each test Extensions in MC extensions folder # retrieve container extensions folder exts = DockerUtil.list_container_dir(self.__class__.container, "/opt/connect/extensions/") self.assertTrue( ("extensions/testExtension3/plugin.xml" in exts) and ("extensions/testExtension2/plugin.xml" in exts) and ("extensions/testExtension1/plugin.xml" in exts)) # wait for MC to come up DockerUtil.wait_for_containers([self.container], self.max_wait_time) except Exception as e: # fail if there is any exception self.fail(e)
def test_keystore_http(self): # HTTP download # expect to find downloading keystore message # expect to see Connect start try: # wait for keystore download message DockerUtil.wait_for_log_message([self.container], "Downloading keystore at", self.max_wait_time) # wait for MC to come up DockerUtil.wait_for_containers([self.container], self.max_wait_time) except Exception as e: # fail if there is any exception self.fail(e)
def test_keystore_http(self): # HTTPS but not allowing insecure # expect to find downloading keystore message # expect to find SSL cert problem try: DockerUtil.wait_for_log_message([self.container], "Downloading keystore at", self.max_wait_time) DockerUtil.wait_for_log_message( [self.container], "SSL certificate problem: self signed certificate", self.max_wait_time) except Exception as e: self.fail(e) # expect Connect to not start with self.assertRaises(Exception) as e: DockerUtil.wait_for_containers([self.container], self.max_wait_time)
def test_custom_jars_http(self): # HTTP download # expect to find downloading custom jars in to folder # expect to see Connect start try: # wait for custom jars download message DockerUtil.wait_for_log_message([self.container], "Downloading Jars at", self.max_wait_time) DockerUtil.wait_for_log_message([self.container], "Unzipping contents of", self.max_wait_time) # wait for MC to come up DockerUtil.wait_for_containers([self.container], self.max_wait_time) except Exception as e: # fail if there is any exception self.fail(e)
def test_extensions_https(self): # HTTPS and allowing insecure # expect not to find SSL cert problem with self.assertRaises(Exception) as e: DockerUtil.wait_for_log_message( [self.container], "SSL certificate problem: self signed certificate", self.max_wait_time) # expect to find downloading extensions in to folder try: DockerUtil.wait_for_log_message([self.container], "Downloading extensions at", self.max_wait_time) DockerUtil.wait_for_log_message([self.container], "Unzipping contents of", self.max_wait_time) except Exception as e: self.fail(e) # Verify plugin.xml file for each test Extensions in MC extensions folder # retrieve container extensions folder exts = DockerUtil.list_container_dir(self.__class__.container, "/opt/connect/extensions/") self.assertTrue(("extensions/testExtension3/plugin.xml" in exts) and ("extensions/testExtension2/plugin.xml" in exts) and ("extensions/testExtension1/plugin.xml" in exts)) # expect to see Connect start try: DockerUtil.wait_for_containers([self.container], self.max_wait_time) except Exception as e: self.fail(e)
def test_CustomJars_http(self): # HTTPS and allowing insecure # expect not to find SSL cert problem with self.assertRaises(Exception) as e: DockerUtil.wait_for_log_message( [self.container], "SSL certificate problem: self signed certificate", self.max_wait_time) # expect to find downloading custom jars in to folder try: DockerUtil.wait_for_log_message([self.container], "Downloading Jars at", self.max_wait_time) DockerUtil.wait_for_log_message([self.container], "Unzipping contents of", self.max_wait_time) except Exception as e: self.fail(e) # expect to see Connect start try: DockerUtil.wait_for_containers([self.container], self.max_wait_time) except Exception as e: self.fail(e)
def test_extensions_https(self): # HTTPS but not allowing insecure # expect to find downloading extensions in to folder # expect to find SSL cert problem try: DockerUtil.wait_for_log_message([self.container], "Downloading extensions at", self.max_wait_time) DockerUtil.wait_for_log_message( [self.container], "SSL certificate problem: self signed certificate", self.max_wait_time) except Exception as e: self.fail(e) # expect Connect to not start try: DockerUtil.wait_for_containers([self.container], self.max_wait_time) except Exception as e: self.fail(e)