Saltstack Official PHP Formula
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

service_spec.rb 902B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. control 'Php service' do
  2. title 'should be running and enabled'
  3. def test_debian
  4. describe service('php5.6-fpm') do
  5. it { should be_enabled }
  6. it { should be_running }
  7. end
  8. describe service('php7.3-fpm') do
  9. it { should be_enabled }
  10. it { should be_running }
  11. end
  12. end
  13. def test_ubuntu
  14. describe service(pkg_name) do
  15. it { should be_enabled }
  16. it { should be_running }
  17. end
  18. end
  19. def test_redhat
  20. describe service('php') do
  21. it { should be_enabled }
  22. it { should be_running }
  23. end
  24. end
  25. def test_suse
  26. describe service('php5') do
  27. it { should be_enabled }
  28. it { should be_running }
  29. end
  30. end
  31. case os[:family]
  32. when 'debian'
  33. case os[:name]
  34. when 'ubuntu'
  35. test_ubuntu
  36. when 'debian'
  37. test_debian
  38. end
  39. when 'redhat', 'fedora'
  40. test_redhat
  41. when 'suse'
  42. test_suse
  43. end
  44. end