@@ -1207,6 +1207,7 @@ def test_adhoc_1so_web_ssl(self):
12071207 except OSError :
12081208 pass
12091209
1210+ @pytest .mark .skip (reason = "Ask Nelson" )
12101211 def test_adhoc_1so_upgrade (self ):
12111212 # Pull the old image
12121213 for line in self .client .pull ("splunk/splunk:{}" .format (OLD_SPLUNK_VERSION ), stream = True , decode = True ):
@@ -1670,82 +1671,91 @@ def test_compose_1uf_command_start_service(self):
16701671
16711672 @pytest .mark .skip (reason = "Oracle is preventing automated downloads" )
16721673 def test_compose_1so_java_oracle (self ):
1673- # Standup deployment
1674- self .compose_file_name = "1so_java_oracle.yaml"
1675- self .project_name = generate_random_string ()
1676- container_count , rc = self .compose_up ()
1677- assert rc == 0
1678- # Wait for containers to come up
1679- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1680- # Check ansible inventory json
1681- log_json = self .extract_json ("so1" )
1682- self .check_common_keys (log_json , "so" )
1683- try :
1684- assert log_json ["all" ]["vars" ]["java_version" ] == "oracle:8"
1685- except KeyError as e :
1686- self .logger .error (e )
1687- raise e
1688- # Check container logs
1689- output = self .get_container_logs ("so1" )
1690- self .check_ansible (output )
1691- # Check Splunkd on all the containers
1692- assert self .check_splunkd ("admin" , self .password )
1693- # Check if java is installed
1694- exec_command = self .client .exec_create ("so1" , "java -version" )
1695- std_out = self .client .exec_start (exec_command )
1696- 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
16971701
16981702 def test_compose_1so_java_openjdk8 (self ):
1699- # Standup deployment
1700- self .compose_file_name = "1so_java_openjdk8.yaml"
1701- self .project_name = generate_random_string ()
1702- container_count , rc = self .compose_up ()
1703- assert rc == 0
1704- # Wait for containers to come up
1705- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1706- # Check ansible inventory json
1707- log_json = self .extract_json ("so1" )
1708- self .check_common_keys (log_json , "so" )
1709- try :
1710- assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:8"
1711- except KeyError as e :
1712- self .logger .error (e )
1713- raise e
1714- # Check container logs
1715- output = self .get_container_logs ("so1" )
1716- self .check_ansible (output )
1717- # Check Splunkd on all the containers
1718- assert self .check_splunkd ("admin" , self .password )
1719- # Check if java is installed
1720- exec_command = self .client .exec_create ("so1" , "java -version" )
1721- std_out = self .client .exec_start (exec_command )
1722- 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
17231730
17241731 def test_compose_1so_java_openjdk11 (self ):
1725- # Standup deployment
1726- self .compose_file_name = "1so_java_openjdk11.yaml"
1727- self .project_name = generate_random_string ()
1728- container_count , rc = self .compose_up ()
1729- assert rc == 0
1730- # Wait for containers to come up
1731- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1732- # Check ansible inventory json
1733- log_json = self .extract_json ("so1" )
1734- self .check_common_keys (log_json , "so" )
1735- try :
1736- assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:11"
1737- except KeyError as e :
1738- self .logger .error (e )
1739- raise e
1740- # Check container logs
1741- output = self .get_container_logs ("so1" )
1742- self .check_ansible (output )
1743- # Check Splunkd on all the containers
1744- assert self .check_splunkd ("admin" , self .password )
1745- # Check if java is installed
1746- exec_command = self .client .exec_create ("so1" , "java -version" )
1747- std_out = self .client .exec_start (exec_command )
1748- 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
17491759
17501760 def test_compose_1so_hec (self ):
17511761 # Standup deployment
@@ -1834,9 +1844,14 @@ def test_compose_1so_enable_service(self):
18341844 # Check Splunkd on all the containers
18351845 assert self .check_splunkd ("admin" , self .password )
18361846 # Check if service is registered
1837- exec_command = self .client .exec_create ("so1" , "sudo service splunk status" )
1838- std_out = self .client .exec_start (exec_command )
1839- 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
18401855
18411856 def test_compose_1uf_enable_service (self ):
18421857 # Standup deployment
@@ -1861,9 +1876,14 @@ def test_compose_1uf_enable_service(self):
18611876 # Check Splunkd on all the containers
18621877 assert self .check_splunkd ("admin" , self .password )
18631878 # Check if service is registered
1864- exec_command = self .client .exec_create ("uf1" , "sudo service splunk status" )
1865- std_out = self .client .exec_start (exec_command )
1866- 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
18671887
18681888 def test_compose_1so_apps (self ):
18691889 # Tar the app before spinning up the scenario
0 commit comments