@@ -1671,82 +1671,91 @@ def test_compose_1uf_command_start_service(self):
16711671
16721672 @pytest .mark .skip (reason = "Oracle is preventing automated downloads" )
16731673 def test_compose_1so_java_oracle (self ):
1674- # Standup deployment
1675- self .compose_file_name = "1so_java_oracle.yaml"
1676- self .project_name = generate_random_string ()
1677- container_count , rc = self .compose_up ()
1678- assert rc == 0
1679- # Wait for containers to come up
1680- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1681- # Check ansible inventory json
1682- log_json = self .extract_json ("so1" )
1683- self .check_common_keys (log_json , "so" )
1684- try :
1685- assert log_json ["all" ]["vars" ]["java_version" ] == "oracle:8"
1686- except KeyError as e :
1687- self .logger .error (e )
1688- raise e
1689- # Check container logs
1690- output = self .get_container_logs ("so1" )
1691- self .check_ansible (output )
1692- # Check Splunkd on all the containers
1693- assert self .check_splunkd ("admin" , self .password )
1694- # Check if java is installed
1695- exec_command = self .client .exec_create ("so1" , "java -version" )
1696- std_out = self .client .exec_start (exec_command )
1697- assert "java version \" 1.8.0" in std_out
1674+ if 'redhat' in platform :
1675+ assert 'Not supported'
1676+ else :
1677+ # Standup deployment
1678+ self .compose_file_name = "1so_java_oracle.yaml"
1679+ self .project_name = generate_random_string ()
1680+ container_count , rc = self .compose_up ()
1681+ assert rc == 0
1682+ # Wait for containers to come up
1683+ assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1684+ # Check ansible inventory json
1685+ log_json = self .extract_json ("so1" )
1686+ self .check_common_keys (log_json , "so" )
1687+ try :
1688+ assert log_json ["all" ]["vars" ]["java_version" ] == "oracle:8"
1689+ except KeyError as e :
1690+ self .logger .error (e )
1691+ raise e
1692+ # Check container logs
1693+ output = self .get_container_logs ("so1" )
1694+ self .check_ansible (output )
1695+ # Check Splunkd on all the containers
1696+ assert self .check_splunkd ("admin" , self .password )
1697+ # Check if java is installed
1698+ exec_command = self .client .exec_create ("so1" , "java -version" )
1699+ std_out = self .client .exec_start (exec_command )
1700+ assert "java version \" 1.8.0" in std_out
16981701
16991702 def test_compose_1so_java_openjdk8 (self ):
1700- # Standup deployment
1701- self .compose_file_name = "1so_java_openjdk8.yaml"
1702- self .project_name = generate_random_string ()
1703- container_count , rc = self .compose_up ()
1704- assert rc == 0
1705- # Wait for containers to come up
1706- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1707- # Check ansible inventory json
1708- log_json = self .extract_json ("so1" )
1709- self .check_common_keys (log_json , "so" )
1710- try :
1711- assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:8"
1712- except KeyError as e :
1713- self .logger .error (e )
1714- raise e
1715- # Check container logs
1716- output = self .get_container_logs ("so1" )
1717- self .check_ansible (output )
1718- # Check Splunkd on all the containers
1719- assert self .check_splunkd ("admin" , self .password )
1720- # Check if java is installed
1721- exec_command = self .client .exec_create ("so1" , "java -version" )
1722- std_out = self .client .exec_start (exec_command )
1723- assert "openjdk version \" 1.8.0" in std_out
1703+ if 'redhat' in platform :
1704+ assert 'Not supported'
1705+ else :
1706+ # Standup deployment
1707+ self .compose_file_name = "1so_java_openjdk8.yaml"
1708+ self .project_name = generate_random_string ()
1709+ container_count , rc = self .compose_up ()
1710+ assert rc == 0
1711+ # Wait for containers to come up
1712+ assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1713+ # Check ansible inventory json
1714+ log_json = self .extract_json ("so1" )
1715+ self .check_common_keys (log_json , "so" )
1716+ try :
1717+ assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:8"
1718+ except KeyError as e :
1719+ self .logger .error (e )
1720+ raise e
1721+ # Check container logs
1722+ output = self .get_container_logs ("so1" )
1723+ self .check_ansible (output )
1724+ # Check Splunkd on all the containers
1725+ assert self .check_splunkd ("admin" , self .password )
1726+ # Check if java is installed
1727+ exec_command = self .client .exec_create ("so1" , "java -version" )
1728+ std_out = self .client .exec_start (exec_command )
1729+ assert "openjdk version \" 1.8.0" in std_out
17241730
17251731 def test_compose_1so_java_openjdk11 (self ):
1726- # Standup deployment
1727- self .compose_file_name = "1so_java_openjdk11.yaml"
1728- self .project_name = generate_random_string ()
1729- container_count , rc = self .compose_up ()
1730- assert rc == 0
1731- # Wait for containers to come up
1732- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1733- # Check ansible inventory json
1734- log_json = self .extract_json ("so1" )
1735- self .check_common_keys (log_json , "so" )
1736- try :
1737- assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:11"
1738- except KeyError as e :
1739- self .logger .error (e )
1740- raise e
1741- # Check container logs
1742- output = self .get_container_logs ("so1" )
1743- self .check_ansible (output )
1744- # Check Splunkd on all the containers
1745- assert self .check_splunkd ("admin" , self .password )
1746- # Check if java is installed
1747- exec_command = self .client .exec_create ("so1" , "java -version" )
1748- std_out = self .client .exec_start (exec_command )
1749- assert "openjdk version \" 11.0.2" in std_out
1732+ if 'redhat' in platform :
1733+ assert 'Not supported'
1734+ else :
1735+ # Standup deployment
1736+ self .compose_file_name = "1so_java_openjdk11.yaml"
1737+ self .project_name = generate_random_string ()
1738+ container_count , rc = self .compose_up ()
1739+ assert rc == 0
1740+ # Wait for containers to come up
1741+ assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1742+ # Check ansible inventory json
1743+ log_json = self .extract_json ("so1" )
1744+ self .check_common_keys (log_json , "so" )
1745+ try :
1746+ assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:11"
1747+ except KeyError as e :
1748+ self .logger .error (e )
1749+ raise e
1750+ # Check container logs
1751+ output = self .get_container_logs ("so1" )
1752+ self .check_ansible (output )
1753+ # Check Splunkd on all the containers
1754+ assert self .check_splunkd ("admin" , self .password )
1755+ # Check if java is installed
1756+ exec_command = self .client .exec_create ("so1" , "java -version" )
1757+ std_out = self .client .exec_start (exec_command )
1758+ assert "openjdk version \" 11.0.2" in std_out
17501759
17511760 def test_compose_1so_hec (self ):
17521761 # Standup deployment
@@ -1835,9 +1844,14 @@ def test_compose_1so_enable_service(self):
18351844 # Check Splunkd on all the containers
18361845 assert self .check_splunkd ("admin" , self .password )
18371846 # Check if service is registered
1838- exec_command = self .client .exec_create ("so1" , "sudo service splunk status" )
1839- std_out = self .client .exec_start (exec_command )
1840- assert "splunkd is running" in std_out
1847+ if 'debian' in platform :
1848+ exec_command = self .client .exec_create ("so1" , "sudo service splunk status" )
1849+ std_out = self .client .exec_start (exec_command )
1850+ assert "splunkd is running" in std_out
1851+ else :
1852+ exec_command = self .client .exec_create ("so1" , "stat /etc/init.d/splunk" )
1853+ std_out = self .client .exec_start (exec_command )
1854+ assert "/etc/init.d/splunk" in std_out
18411855
18421856 def test_compose_1uf_enable_service (self ):
18431857 # Standup deployment
@@ -1862,9 +1876,14 @@ def test_compose_1uf_enable_service(self):
18621876 # Check Splunkd on all the containers
18631877 assert self .check_splunkd ("admin" , self .password )
18641878 # Check if service is registered
1865- exec_command = self .client .exec_create ("uf1" , "sudo service splunk status" )
1866- std_out = self .client .exec_start (exec_command )
1867- assert "splunkd is running" in std_out
1879+ if 'debian' in platform :
1880+ exec_command = self .client .exec_create ("uf1" , "sudo service splunk status" )
1881+ std_out = self .client .exec_start (exec_command )
1882+ assert "splunkd is running" in std_out
1883+ else :
1884+ exec_command = self .client .exec_create ("uf1" , "stat /etc/init.d/splunk" )
1885+ std_out = self .client .exec_start (exec_command )
1886+ assert "/etc/init.d/splunk" in std_out
18681887
18691888 def test_compose_1so_apps (self ):
18701889 # Tar the app before spinning up the scenario
0 commit comments