@@ -852,7 +852,6 @@ def test_adhoc_1so_run_as_root(self):
852852 finally :
853853 if cid :
854854 self .client .remove_container (cid , v = True , force = True )
855-
856855
857856 def test_adhoc_1so_declarative_password (self ):
858857 """
@@ -1014,6 +1013,9 @@ def test_adhoc_1so_hec_idempotence(self):
10141013 self .client .exec_start (exec_command )
10151014 # Restart the container - it should pick up the new HEC settings in /tmp/defaults/default.yml
10161015 self .client .restart (splunk_container_name )
1016+ # After restart, a container's logs are preserved. So, sleep in order for the self.wait_for_containers()
1017+ # to avoid seeing the prior entrypoint's "Ansible playbook complete" string
1018+ time .sleep (15 )
10171019 assert self .wait_for_containers (1 , name = splunk_container_name )
10181020 assert self .check_splunkd ("admin" , self .password , name = splunk_container_name )
10191021 # Check the new HEC settings
@@ -1047,6 +1049,9 @@ def test_adhoc_1so_hec_idempotence(self):
10471049 self .client .exec_start (exec_command )
10481050 # Restart the container - it should pick up the new HEC settings in /tmp/defaults/default.yml
10491051 self .client .restart (splunk_container_name )
1052+ # After restart, a container's logs are preserved. So, sleep in order for the self.wait_for_containers()
1053+ # to avoid seeing the prior entrypoint's "Ansible playbook complete" string
1054+ time .sleep (15 )
10501055 assert self .wait_for_containers (1 , name = splunk_container_name )
10511056 assert self .check_splunkd ("admin" , self .password , name = splunk_container_name )
10521057 # Check the new HEC settings
@@ -1078,6 +1083,9 @@ def test_adhoc_1so_hec_idempotence(self):
10781083 self .client .exec_start (exec_command )
10791084 # Restart the container - it should pick up the new HEC settings in /tmp/defaults/default.yml
10801085 self .client .restart (splunk_container_name )
1086+ # After restart, a container's logs are preserved. So, sleep in order for the self.wait_for_containers()
1087+ # to avoid seeing the prior entrypoint's "Ansible playbook complete" string
1088+ time .sleep (15 )
10811089 assert self .wait_for_containers (1 , name = splunk_container_name )
10821090 assert self .check_splunkd ("admin" , self .password , name = splunk_container_name )
10831091 # Check the new HEC settings
@@ -1102,6 +1110,9 @@ def test_adhoc_1so_hec_idempotence(self):
11021110 self .client .exec_start (exec_command )
11031111 # Restart the container - it should pick up the new HEC settings in /tmp/defaults/default.yml
11041112 self .client .restart (splunk_container_name )
1113+ # After restart, a container's logs are preserved. So, sleep in order for the self.wait_for_containers()
1114+ # to avoid seeing the prior entrypoint's "Ansible playbook complete" string
1115+ time .sleep (15 )
11051116 assert self .wait_for_containers (1 , name = splunk_container_name )
11061117 assert self .check_splunkd ("admin" , self .password , name = splunk_container_name )
11071118 # Check the new HEC settings
@@ -1288,13 +1299,15 @@ def test_compose_1so_java_oracle(self):
12881299 assert "java version \" 1.8.0" in std_out
12891300 # Restart the container and make sure java is still installed
12901301 self .client .restart ("{}_so1_1" .format (self .project_name ))
1302+ # After restart, a container's logs are preserved. So, sleep in order for the self.wait_for_containers()
1303+ # to avoid seeing the prior entrypoint's "Ansible playbook complete" string
1304+ time .sleep (15 )
12911305 assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
12921306 assert self .check_splunkd ("admin" , self .password )
12931307 exec_command = self .client .exec_create ("{}_so1_1" .format (self .project_name ), "java -version" )
12941308 std_out = self .client .exec_start (exec_command )
12951309 assert "java version \" 1.8.0" in std_out
12961310
1297-
12981311 def test_compose_1so_java_openjdk8 (self ):
12991312 # Standup deployment
13001313 self .compose_file_name = "1so_java_openjdk8.yaml"
@@ -1322,6 +1335,9 @@ def test_compose_1so_java_openjdk8(self):
13221335 assert "openjdk version \" 1.8.0" in std_out
13231336 # Restart the container and make sure java is still installed
13241337 self .client .restart ("{}_so1_1" .format (self .project_name ))
1338+ # After restart, a container's logs are preserved. So, sleep in order for the self.wait_for_containers()
1339+ # to avoid seeing the prior entrypoint's "Ansible playbook complete" string
1340+ time .sleep (15 )
13251341 assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
13261342 assert self .check_splunkd ("admin" , self .password )
13271343 exec_command = self .client .exec_create ("{}_so1_1" .format (self .project_name ), "java -version" )
@@ -1356,6 +1372,9 @@ def test_compose_1so_java_openjdk11(self):
13561372 assert "openjdk version \" 11.0.2" in std_out
13571373 # Restart the container and make sure java is still installed
13581374 self .client .restart ("{}_so1_1" .format (self .project_name ))
1375+ # After restart, a container's logs are preserved. So, sleep in order for the self.wait_for_containers()
1376+ # to avoid seeing the prior entrypoint's "Ansible playbook complete" string
1377+ time .sleep (15 )
13591378 assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
13601379 assert self .check_splunkd ("admin" , self .password )
13611380 exec_command = self .client .exec_create ("{}_so1_1" .format (self .project_name ), "java -version" )
0 commit comments