diff --git a/roles/web_server/molecule/default/tests/test_mandatory.py b/roles/web_server/molecule/default/tests/test_mandatory.py index ea0db69ec07ec195459660aab9f30f9624d99a29..0b5ae7aff90a952b35cadea0f0c1c7ef40e60f13 100644 --- a/roles/web_server/molecule/default/tests/test_mandatory.py +++ b/roles/web_server/molecule/default/tests/test_mandatory.py @@ -12,7 +12,7 @@ def test_nginx_tls_files(host): Tests if TLS private key and certificate have been deployed correctly. """ - hostname = host.run('hostname').stdout + hostname = host.run('hostname').stdout.strip() with host.sudo(): @@ -37,7 +37,7 @@ def test_certificate_validity_check_configuration(host): correctly. """ - hostname = host.run('hostname').stdout + hostname = host.run('hostname').stdout.strip() config = host.file('/etc/check_certificate/%s_https.conf' % hostname) assert config.is_file diff --git a/roles/web_server/molecule/default/tests/test_optional.py b/roles/web_server/molecule/default/tests/test_optional.py index ec3088f08c5b8be3f7bef0aebe06c9079161d76b..12808f9fa8e0a00a8d1a6465a653dc978fca0ea5 100644 --- a/roles/web_server/molecule/default/tests/test_optional.py +++ b/roles/web_server/molecule/default/tests/test_optional.py @@ -12,7 +12,7 @@ def test_nginx_tls_files(host): Tests if TLS private key and certificate have been deployed correctly. """ - hostname = host.run('hostname').stdout + hostname = host.run('hostname').stdout.strip() with host.sudo(): @@ -37,7 +37,7 @@ def test_certificate_validity_check_configuration(host): correctly. """ - hostname = host.run('hostname').stdout + hostname = host.run('hostname').stdout.strip() config = host.file('/etc/check_certificate/%s_https.conf' % hostname) assert config.is_file