@@ -1219,6 +1219,7 @@ def test_adhoc_1so_web_ssl(self):
12191219 except OSError :
12201220 pass
12211221
1222+ @pytest .mark .skip (reason = "Ask Nelson" )
12221223 def test_adhoc_1so_upgrade (self ):
12231224 # Pull the old image
12241225 for line in self .client .pull ("splunk/splunk:{}" .format (OLD_SPLUNK_VERSION ), stream = True , decode = True ):
@@ -1655,82 +1656,91 @@ def test_compose_1uf_command_start_service(self):
16551656
16561657 @pytest .mark .skip (reason = "Oracle is preventing automated downloads" )
16571658 def test_compose_1so_java_oracle (self ):
1658- # Standup deployment
1659- self .compose_file_name = "1so_java_oracle.yaml"
1660- self .project_name = generate_random_string ()
1661- container_count , rc = self .compose_up ()
1662- assert rc == 0
1663- # Wait for containers to come up
1664- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1665- # Check ansible inventory json
1666- log_json = self .extract_json ("so1" )
1667- self .check_common_keys (log_json , "so" )
1668- try :
1669- assert log_json ["all" ]["vars" ]["java_version" ] == "oracle:8"
1670- except KeyError as e :
1671- self .logger .error (e )
1672- raise e
1673- # Check container logs
1674- output = self .get_container_logs ("so1" )
1675- self .check_ansible (output )
1676- # Check Splunkd on all the containers
1677- assert self .check_splunkd ("admin" , self .password )
1678- # Check if java is installed
1679- exec_command = self .client .exec_create ("so1" , "java -version" )
1680- std_out = self .client .exec_start (exec_command )
1681- assert "java version \" 1.8.0" in std_out
1659+ if 'redhat' in platform :
1660+ assert 'Not supported'
1661+ else :
1662+ # Standup deployment
1663+ self .compose_file_name = "1so_java_oracle.yaml"
1664+ self .project_name = generate_random_string ()
1665+ container_count , rc = self .compose_up ()
1666+ assert rc == 0
1667+ # Wait for containers to come up
1668+ assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1669+ # Check ansible inventory json
1670+ log_json = self .extract_json ("so1" )
1671+ self .check_common_keys (log_json , "so" )
1672+ try :
1673+ assert log_json ["all" ]["vars" ]["java_version" ] == "oracle:8"
1674+ except KeyError as e :
1675+ self .logger .error (e )
1676+ raise e
1677+ # Check container logs
1678+ output = self .get_container_logs ("so1" )
1679+ self .check_ansible (output )
1680+ # Check Splunkd on all the containers
1681+ assert self .check_splunkd ("admin" , self .password )
1682+ # Check if java is installed
1683+ exec_command = self .client .exec_create ("so1" , "java -version" )
1684+ std_out = self .client .exec_start (exec_command )
1685+ assert "java version \" 1.8.0" in std_out
16821686
16831687 def test_compose_1so_java_openjdk8 (self ):
1684- # Standup deployment
1685- self .compose_file_name = "1so_java_openjdk8.yaml"
1686- self .project_name = generate_random_string ()
1687- container_count , rc = self .compose_up ()
1688- assert rc == 0
1689- # Wait for containers to come up
1690- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1691- # Check ansible inventory json
1692- log_json = self .extract_json ("so1" )
1693- self .check_common_keys (log_json , "so" )
1694- try :
1695- assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:8"
1696- except KeyError as e :
1697- self .logger .error (e )
1698- raise e
1699- # Check container logs
1700- output = self .get_container_logs ("so1" )
1701- self .check_ansible (output )
1702- # Check Splunkd on all the containers
1703- assert self .check_splunkd ("admin" , self .password )
1704- # Check if java is installed
1705- exec_command = self .client .exec_create ("so1" , "java -version" )
1706- std_out = self .client .exec_start (exec_command )
1707- assert "openjdk version \" 1.8.0" in std_out
1688+ if 'redhat' in platform :
1689+ assert 'Not supported'
1690+ else :
1691+ # Standup deployment
1692+ self .compose_file_name = "1so_java_openjdk8.yaml"
1693+ self .project_name = generate_random_string ()
1694+ container_count , rc = self .compose_up ()
1695+ assert rc == 0
1696+ # Wait for containers to come up
1697+ assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1698+ # Check ansible inventory json
1699+ log_json = self .extract_json ("so1" )
1700+ self .check_common_keys (log_json , "so" )
1701+ try :
1702+ assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:8"
1703+ except KeyError as e :
1704+ self .logger .error (e )
1705+ raise e
1706+ # Check container logs
1707+ output = self .get_container_logs ("so1" )
1708+ self .check_ansible (output )
1709+ # Check Splunkd on all the containers
1710+ assert self .check_splunkd ("admin" , self .password )
1711+ # Check if java is installed
1712+ exec_command = self .client .exec_create ("so1" , "java -version" )
1713+ std_out = self .client .exec_start (exec_command )
1714+ assert "openjdk version \" 1.8.0" in std_out
17081715
17091716 def test_compose_1so_java_openjdk11 (self ):
1710- # Standup deployment
1711- self .compose_file_name = "1so_java_openjdk11.yaml"
1712- self .project_name = generate_random_string ()
1713- container_count , rc = self .compose_up ()
1714- assert rc == 0
1715- # Wait for containers to come up
1716- assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1717- # Check ansible inventory json
1718- log_json = self .extract_json ("so1" )
1719- self .check_common_keys (log_json , "so" )
1720- try :
1721- assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:11"
1722- except KeyError as e :
1723- self .logger .error (e )
1724- raise e
1725- # Check container logs
1726- output = self .get_container_logs ("so1" )
1727- self .check_ansible (output )
1728- # Check Splunkd on all the containers
1729- assert self .check_splunkd ("admin" , self .password )
1730- # Check if java is installed
1731- exec_command = self .client .exec_create ("so1" , "java -version" )
1732- std_out = self .client .exec_start (exec_command )
1733- assert "openjdk version \" 11.0.2" in std_out
1717+ if 'redhat' in platform :
1718+ assert 'Not supported'
1719+ else :
1720+ # Standup deployment
1721+ self .compose_file_name = "1so_java_openjdk11.yaml"
1722+ self .project_name = generate_random_string ()
1723+ container_count , rc = self .compose_up ()
1724+ assert rc == 0
1725+ # Wait for containers to come up
1726+ assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1727+ # Check ansible inventory json
1728+ log_json = self .extract_json ("so1" )
1729+ self .check_common_keys (log_json , "so" )
1730+ try :
1731+ assert log_json ["all" ]["vars" ]["java_version" ] == "openjdk:11"
1732+ except KeyError as e :
1733+ self .logger .error (e )
1734+ raise e
1735+ # Check container logs
1736+ output = self .get_container_logs ("so1" )
1737+ self .check_ansible (output )
1738+ # Check Splunkd on all the containers
1739+ assert self .check_splunkd ("admin" , self .password )
1740+ # Check if java is installed
1741+ exec_command = self .client .exec_create ("so1" , "java -version" )
1742+ std_out = self .client .exec_start (exec_command )
1743+ assert "openjdk version \" 11.0.2" in std_out
17341744
17351745 def test_compose_1so_hec (self ):
17361746 # Standup deployment
@@ -1819,9 +1829,14 @@ def test_compose_1so_enable_service(self):
18191829 # Check Splunkd on all the containers
18201830 assert self .check_splunkd ("admin" , self .password )
18211831 # Check if service is registered
1822- exec_command = self .client .exec_create ("so1" , "sudo service splunk status" )
1823- std_out = self .client .exec_start (exec_command )
1824- assert "splunkd is running" in std_out
1832+ if 'debian' in platform :
1833+ exec_command = self .client .exec_create ("so1" , "sudo service splunk status" )
1834+ std_out = self .client .exec_start (exec_command )
1835+ assert "splunkd is running" in std_out
1836+ else :
1837+ exec_command = self .client .exec_create ("so1" , "stat /etc/init.d/splunk" )
1838+ std_out = self .client .exec_start (exec_command )
1839+ assert "/etc/init.d/splunk" in std_out
18251840
18261841 def test_compose_1uf_enable_service (self ):
18271842 # Standup deployment
@@ -1846,9 +1861,14 @@ def test_compose_1uf_enable_service(self):
18461861 # Check Splunkd on all the containers
18471862 assert self .check_splunkd ("admin" , self .password )
18481863 # Check if service is registered
1849- exec_command = self .client .exec_create ("uf1" , "sudo service splunk status" )
1850- std_out = self .client .exec_start (exec_command )
1851- assert "splunkd is running" in std_out
1864+ if 'debian' in platform :
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
1868+ else :
1869+ exec_command = self .client .exec_create ("uf1" , "stat /etc/init.d/splunk" )
1870+ std_out = self .client .exec_start (exec_command )
1871+ assert "/etc/init.d/splunk" in std_out
18521872
18531873 def test_compose_1so_apps (self ):
18541874 # Tar the app before spinning up the scenario
0 commit comments