-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathpackage_spec.rb
More file actions
63 lines (54 loc) · 1.21 KB
/
package_spec.rb
File metadata and controls
63 lines (54 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# frozen_string_literal: true
control 'Php package' do
title 'should be installed'
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
def test_debian
describe package('php-imagick') do
it { should be_installed }
end
describe package('php-xdebug') do
it { should be_installed }
end
%w[
bz2 cli curl fpm gd imap intl mbstring
mysql readline redis xml zip
].each do |pkg|
describe package("php5.6-#{pkg}") do
it { should be_installed }
end
describe package("php7.3-#{pkg}") do
it { should be_installed }
end
end
end
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
def test_redhat
describe package('php') do
it { should be_installed }
end
end
def test_suse
describe package('php8') do
it { should be_installed }
end
end
def test_bsd
%w[
php74 php74-filter php74-json php74-mbstring php74-openssl php74-phar
].each do |pkg|
describe package(pkg) do
it { should be_installed }
end
end
end
case os[:family]
when 'debian'
test_debian
when 'redhat', 'fedora'
test_redhat
when 'suse'
test_suse
when 'bsd'
test_bsd
end
end