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.

41 lines
1.1KB

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