Changeset - 57e103ba33ee
[Not reviewed]
0 2 0
Branko Majic (branko) - 4 years ago 2020-01-07 00:59:41
branko@majic.rs
MAR-148: Fixed tests for php_website role (newline handling in output).
2 files changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
roles/php_website/molecule/default/tests/test_parameters_mandatory.py
Show inline comments
 
@@ -79,7 +79,7 @@ def test_website_application_user(host):
 

	
 
    with host.sudo():
 
        umask = host.run("su -l web-parameters-mandatory -c 'bash -c umask'")
 
        assert umask.stdout == '0007'
 
        assert umask.stdout == '0007\n'
 

	
 

	
 
def test_nginx_user(host):
 
@@ -103,7 +103,7 @@ def test_forward_file(host):
 
        assert config.user == 'root'
 
        assert config.group == 'web-parameters-mandatory'
 
        assert config.mode == 0o640
 
        assert config.content == "root"
 
        assert config.content == "root\n"
 

	
 

	
 
def test_mail_forwarding(host):
 
@@ -111,7 +111,7 @@ def test_mail_forwarding(host):
 
    Tests if mail forwarding works as expected.
 
    """
 

	
 
    hostname = host.run('hostname').stdout
 
    hostname = host.run('hostname').stdout.strip()
 

	
 
    send = host.run('swaks --suppress-data --to web-parameters-mandatory@localhost')
 
    assert send.rc == 0
roles/php_website/molecule/default/tests/test_parameters_optional.py
Show inline comments
 
@@ -79,7 +79,7 @@ def test_website_application_user(host):
 

	
 
    with host.sudo():
 
        umask = host.run("su -l web-parameters-optional_local -c 'bash -c umask'")
 
        assert umask.stdout == '0007'
 
        assert umask.stdout == '0007\n'
 

	
 

	
 
def test_nginx_user(host):
 
@@ -103,7 +103,7 @@ def test_forward_file(host):
 
        assert config.user == 'root'
 
        assert config.group == 'web-parameters-optional_local'
 
        assert config.mode == 0o640
 
        assert config.content == "user"
 
        assert config.content == "user\n"
 

	
 

	
 
def test_mail_forwarding(host):
 
@@ -111,7 +111,7 @@ def test_mail_forwarding(host):
 
    Tests if mail forwarding works as expected.
 
    """
 

	
 
    hostname = host.run('hostname').stdout
 
    hostname = host.run('hostname').stdout.strip()
 

	
 
    send = host.run('swaks --suppress-data --to web-parameters-optional_local@localhost')
 
    assert send.rc == 0
0 comments (0 inline, 0 general)