Changeset - 37cc1e381720
[Not reviewed]
0 2 0
Branko Majic (branko) - 7 years ago 2017-07-13 14:45:55
branko@majic.rs
MAR-29: Small fix for php_website role tests:

- Sleep for 5 seconds when testing mail sending (aliases), so the mail can get
delivered.
2 files changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
roles/php_website/tests/test_parameters_mandatory.py
Show inline comments
 
import re
 
import time
 

	
 

	
 
import testinfra.utils.ansible_runner
 
@@ -114,6 +115,9 @@ def test_mail_forwarding(Command, File, Sudo):
 
    assert send.rc == 0
 
    message_id = re.search('Ok: queued as (.*)', send.stdout).group(1)
 

	
 
    # Sleep for a couple of seconds so the mail can get delivered.
 
    time.sleep(5)
 

	
 
    with Sudo():
 
        mail_log = File('/var/log/mail.log')
 

	
roles/php_website/tests/test_parameters_optional.py
Show inline comments
 
import re
 
import time
 

	
 

	
 
import testinfra.utils.ansible_runner
 
@@ -114,6 +115,9 @@ def test_mail_forwarding(Command, File, Sudo):
 
    assert send.rc == 0
 
    message_id = re.search('Ok: queued as (.*)', send.stdout).group(1)
 

	
 
    # Sleep for a couple of seconds so the mail can get delivered.
 
    time.sleep(5)
 

	
 
    with Sudo():
 
        mail_log = File('/var/log/mail.log')
 

	
0 comments (0 inline, 0 general)