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.

56 satır
1.1KB

  1. # frozen_string_literal: true
  2. control 'Php package' do
  3. title 'should be installed'
  4. # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
  5. def test_debian
  6. describe package('php-imagick') do
  7. it { should be_installed }
  8. end
  9. describe package('php-redis') do
  10. it { should be_installed }
  11. end
  12. describe package('php-xdebug') do
  13. it { should be_installed }
  14. end
  15. %w[
  16. bz2 cli curl fpm gd imap intl mbstring
  17. mysql readline xml zip
  18. ].each do |pkg|
  19. describe package("php5.6-#{pkg}") do
  20. it { should be_installed }
  21. end
  22. describe package("php7.3-#{pkg}") do
  23. it { should be_installed }
  24. end
  25. end
  26. end
  27. # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
  28. def test_redhat
  29. describe package('php') do
  30. it { should be_installed }
  31. end
  32. end
  33. def test_suse
  34. describe package('php7') do
  35. it { should be_installed }
  36. end
  37. end
  38. case os[:family]
  39. when 'debian'
  40. test_debian
  41. when 'redhat', 'fedora'
  42. test_redhat
  43. when 'suse'
  44. test_suse
  45. end
  46. end