Changeset - 67b8b48d5171
[Not reviewed]
0 1 0
Branko Majic (branko) - 5 years ago 2018-10-17 22:02:50
branko@majic.rs
MAR-132: Fix PHP timezone test for Debian Stretch in web_server role:

- Read the timezone from server instead of depending on fixed value.
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
roles/web_server/molecule/default/tests/test_default.py
Show inline comments
 
@@ -217,6 +217,8 @@ def test_php_timezone_configuration(host, php_info):
 
    Tests if PHP timezone configuration has been set correctly.
 
    """
 

	
 
    server_timezone = host.file("/etc/timezone").content.strip()
 

	
 
    config = host.file('%s/cli/conf.d/30-timezone.ini' % php_info.base_config_dir)
 
    assert config.is_file
 
    assert config.user == 'root'
 
@@ -231,8 +233,8 @@ def test_php_timezone_configuration(host, php_info):
 

	
 
    timezone = host.run("php --php-ini %s -r %s", "%s/cli/php.ini" % php_info.base_config_dir, "echo ini_get('date.timezone');")
 
    assert timezone.rc == 0
 
    assert timezone.stdout == "GMT+0"
 
    assert timezone.stdout == server_timezone
 

	
 
    timezone = host.run("php --php-ini %s -r %s", "%s/fpm/php.ini" % php_info.base_config_dir, "echo ini_get('date.timezone');")
 
    assert timezone.rc == 0
 
    assert timezone.stdout == "GMT+0"
 
    assert timezone.stdout == server_timezone
0 comments (0 inline, 0 general)