Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
966B

  1. control 'Php configuration' do
  2. title 'should match desired lines'
  3. def test_debian
  4. describe file('/etc/php/5.6/fpm/pool.d/radius-admin.conf') do
  5. its('content') { should include '[radius-admin]' }
  6. its('content') { should include 'php_admin_value[date.timezone] = Europe/Paris' }
  7. end
  8. describe file('/etc/php/7.3/fpm/pool.d/ldap-admin.conf') do
  9. its('content') { should include '[ldap-admin]' }
  10. its('content') { should include 'php_admin_value[date.timezone] = Europe/Paris' }
  11. end
  12. describe file('/etc/php/5.6/fpm/php.ini') do
  13. its('content') { should include 'date.timezone = Europe/Paris' }
  14. end
  15. describe file('/etc/php/7.3/fpm/php.ini') do
  16. its('content') { should include 'date.timezone = Europe/Paris' }
  17. end
  18. end
  19. def test_redhat
  20. end
  21. def test_suse
  22. end
  23. case os[:family]
  24. when 'debian'
  25. test_debian
  26. when 'redhat', 'fedora'
  27. test_redhat
  28. when 'suse'
  29. test_suse
  30. end
  31. end