File diff 6bb8ed6d6443 → d752715bb533
roles/mail_forwarder/molecule/default/tests/test_smtp_relay_host_port.py
Show inline comments
 
@@ -17,7 +17,7 @@ def test_postfix_main_cf_file_content(host):
 

	
 
    hostname = host.run('hostname').stdout.strip()
 
    config = host.file('/etc/postfix/main.cf')
 
    config_lines = config.content.split("\n")
 
    config_lines = config.content_string.split("\n")
 

	
 
    assert "myhostname = %s" % hostname in config_lines
 
    assert "mydestination = %s, %s, localhost.localdomain, localhost" % (hostname, hostname) in config_lines
 
@@ -45,4 +45,4 @@ def test_relay_mail_sending(host):
 
        # Pattern used to verify the mail was sent over relay on default port.
 
        pattern = r"%s: to=<root@domain1>, relay=mail-server\[[^]]*\]:25.*status=sent" % message_id
 

	
 
        assert re.search(pattern, mail_log.content) is not None
 
        assert re.search(pattern, mail_log.content_string) is not None