Changeset - 2c31a37b0ff2
[Not reviewed]
0 3 0
Branko Majic (branko) - 2 months ago 2025-02-03 14:52:19
branko@majic.rs
MAR-243: Drop inventory hostname usage from web_server tests.
3 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general) First comment
roles/web_server/molecule/default/tests/test_default.py
Show inline comments
 
@@ -342,7 +342,7 @@ def test_tls_enabled(host):
 
    Tests if TLS has been enabled.
 
    """
 

	
 
    hostname = host.ansible.get_variables()['inventory_hostname']
 
    hostname = host.run('hostname').stdout.strip()
 

	
 
    tls = host.run('curl https://%s/', hostname)
 
    assert tls.rc == 0
 
@@ -353,7 +353,7 @@ def test_https_enforcement(host):
 
    Tests if HTTPS is being enforced.
 
    """
 

	
 
    hostname = host.ansible.get_variables()['inventory_hostname']
 
    hostname = host.run('hostname').stdout.strip()
 

	
 
    https_enforcement = host.run('curl -I http://%s/', hostname)
 

	
roles/web_server/molecule/default/tests/test_mandatory.py
Show inline comments
 
@@ -56,7 +56,7 @@ def test_default_vhost_index_page(host):
 
    Tests content of default vhost index page.
 
    """
 

	
 
    hostname = host.ansible.get_variables()['inventory_hostname']
 
    hostname = host.run('hostname').stdout.strip()
 
    page = host.run('curl https://%s/', hostname)
 

	
 
    assert page.rc == 0
roles/web_server/molecule/default/tests/test_optional.py
Show inline comments
 
@@ -56,7 +56,7 @@ def test_default_vhost_index_page(host):
 
    Tests content of default vhost index page.
 
    """
 

	
 
    hostname = host.ansible.get_variables()['inventory_hostname']
 
    hostname = host.run('hostname').stdout.strip()
 
    page = host.run('curl https://%s/', hostname)
 

	
 
    assert page.rc == 0
 
@@ -70,7 +70,7 @@ def test_environment_indicator(host):
 
    Tests if environment indicator is applied correctly.
 
    """
 

	
 
    hostname = host.ansible.get_variables()['inventory_hostname']
 
    hostname = host.run('hostname').stdout.strip()
 

	
 
    page = host.run('curl https://%s/' % hostname)
 

	
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now