@@ -852,7 +852,6 @@ def test_adhoc_1so_run_as_root(self):
852
852
finally :
853
853
if cid :
854
854
self .client .remove_container (cid , v = True , force = True )
855
-
856
855
857
856
def test_adhoc_1so_declarative_password (self ):
858
857
"""
@@ -1014,6 +1013,9 @@ def test_adhoc_1so_hec_idempotence(self):
1014
1013
self .client .exec_start (exec_command )
1015
1014
# Restart the container - it should pick up the new HEC settings in /tmp/defaults/default.yml
1016
1015
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 )
1017
1019
assert self .wait_for_containers (1 , name = splunk_container_name )
1018
1020
assert self .check_splunkd ("admin" , self .password , name = splunk_container_name )
1019
1021
# Check the new HEC settings
@@ -1047,6 +1049,9 @@ def test_adhoc_1so_hec_idempotence(self):
1047
1049
self .client .exec_start (exec_command )
1048
1050
# Restart the container - it should pick up the new HEC settings in /tmp/defaults/default.yml
1049
1051
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 )
1050
1055
assert self .wait_for_containers (1 , name = splunk_container_name )
1051
1056
assert self .check_splunkd ("admin" , self .password , name = splunk_container_name )
1052
1057
# Check the new HEC settings
@@ -1078,6 +1083,9 @@ def test_adhoc_1so_hec_idempotence(self):
1078
1083
self .client .exec_start (exec_command )
1079
1084
# Restart the container - it should pick up the new HEC settings in /tmp/defaults/default.yml
1080
1085
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 )
1081
1089
assert self .wait_for_containers (1 , name = splunk_container_name )
1082
1090
assert self .check_splunkd ("admin" , self .password , name = splunk_container_name )
1083
1091
# Check the new HEC settings
@@ -1102,6 +1110,9 @@ def test_adhoc_1so_hec_idempotence(self):
1102
1110
self .client .exec_start (exec_command )
1103
1111
# Restart the container - it should pick up the new HEC settings in /tmp/defaults/default.yml
1104
1112
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 )
1105
1116
assert self .wait_for_containers (1 , name = splunk_container_name )
1106
1117
assert self .check_splunkd ("admin" , self .password , name = splunk_container_name )
1107
1118
# Check the new HEC settings
@@ -1288,13 +1299,15 @@ def test_compose_1so_java_oracle(self):
1288
1299
assert "java version \" 1.8.0" in std_out
1289
1300
# Restart the container and make sure java is still installed
1290
1301
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 )
1291
1305
assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1292
1306
assert self .check_splunkd ("admin" , self .password )
1293
1307
exec_command = self .client .exec_create ("{}_so1_1" .format (self .project_name ), "java -version" )
1294
1308
std_out = self .client .exec_start (exec_command )
1295
1309
assert "java version \" 1.8.0" in std_out
1296
1310
1297
-
1298
1311
def test_compose_1so_java_openjdk8 (self ):
1299
1312
# Standup deployment
1300
1313
self .compose_file_name = "1so_java_openjdk8.yaml"
@@ -1322,6 +1335,9 @@ def test_compose_1so_java_openjdk8(self):
1322
1335
assert "openjdk version \" 1.8.0" in std_out
1323
1336
# Restart the container and make sure java is still installed
1324
1337
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 )
1325
1341
assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1326
1342
assert self .check_splunkd ("admin" , self .password )
1327
1343
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):
1356
1372
assert "openjdk version \" 11.0.2" in std_out
1357
1373
# Restart the container and make sure java is still installed
1358
1374
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 )
1359
1378
assert self .wait_for_containers (container_count , label = "com.docker.compose.project={}" .format (self .project_name ))
1360
1379
assert self .check_splunkd ("admin" , self .password )
1361
1380
exec_command = self .client .exec_create ("{}_so1_1" .format (self .project_name ), "java -version" )
0 commit comments