Skip to content

Commit cb2758d

Browse files
committed
test(freebsd): add specific tests for FreeBSD
1 parent b876d6b commit cb2758d

File tree

5 files changed

+631
-0
lines changed

5 files changed

+631
-0
lines changed

test/integration/default/controls/config_spec.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,23 @@ def test_redhat; end
2929

3030
def test_suse; end
3131

32+
def test_bsd
33+
describe file('/usr/local/bin/composer') do
34+
it { should be_file }
35+
it { should be_owned_by 'root' }
36+
it { should be_grouped_into 'wheel' }
37+
its('mode') { should cmp '0755' }
38+
end
39+
end
40+
3241
case os[:family]
3342
when 'debian'
3443
test_debian
3544
when 'redhat', 'fedora'
3645
test_redhat
3746
when 'suse'
3847
test_suse
48+
when 'bsd'
49+
test_bsd
3950
end
4051
end

test/integration/default/controls/package_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,24 @@ def test_suse
4444
end
4545
end
4646

47+
def test_bsd
48+
%w[
49+
php74 php74-filter php74-json php74-mbstring php74-openssl php74-phar
50+
].each do |pkg|
51+
describe package(pkg) do
52+
it { should be_installed }
53+
end
54+
end
55+
end
56+
4757
case os[:family]
4858
when 'debian'
4959
test_debian
5060
when 'redhat', 'fedora'
5161
test_redhat
5262
when 'suse'
5363
test_suse
64+
when 'bsd'
65+
test_bsd
5466
end
5567
end

test/integration/default/controls/service_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ def test_redhat; end
1919

2020
def test_suse; end
2121

22+
def test_bsd; end
23+
2224
case os[:family]
2325
when 'debian'
2426
test_debian
2527
when 'redhat', 'fedora'
2628
test_redhat
2729
when 'suse'
2830
test_suse
31+
when 'bsd'
32+
test_bsd
2933
end
3034
end
Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
# yamllint disable rule:indentation rule:line-length
2+
# FreeBSD-11
3+
---
4+
values:
5+
apache2:
6+
ini:
7+
opts: {}
8+
settings: {}
9+
cli:
10+
ini:
11+
opts: {}
12+
settings: {}
13+
fpm:
14+
config:
15+
conf:
16+
opts: {}
17+
settings: {}
18+
ini:
19+
opts: {}
20+
settings: {}
21+
pools:
22+
default.conf:
23+
enabled: false
24+
opts: {}
25+
service:
26+
enabled: true
27+
opts: {}
28+
hhvm:
29+
config:
30+
php:
31+
opts: {}
32+
settings: {}
33+
server:
34+
opts: {}
35+
settings: {}
36+
service:
37+
enabled: true
38+
opts: {}
39+
ini:
40+
defaults:
41+
CLI Server:
42+
cli_server.color: 'On'
43+
Date:
44+
date.timezone: America/New_York
45+
Interbase:
46+
ibase.allow_persistent: 1
47+
ibase.dateformat: '"%Y-%m-%d"'
48+
ibase.max_links: -1
49+
ibase.max_persistent: -1
50+
ibase.timeformat: '"%H:%M:%S"'
51+
ibase.timestampformat: '"%Y-%m-%d %H:%M:%S"'
52+
MSSQL:
53+
mssql.allow_persistent: 'On'
54+
mssql.compatibility_mode: 'Off'
55+
mssql.max_links: -1
56+
mssql.max_persistent: -1
57+
mssql.min_error_severity: 10
58+
mssql.min_message_severity: 10
59+
mssql.secure_connection: 'Off'
60+
MySQL:
61+
mysql.allow_local_infile: 'On'
62+
mysql.allow_persistent: 'On'
63+
mysql.cache_size: '2000'
64+
mysql.connect_timeout: 60
65+
mysql.max_links: -1
66+
mysql.max_persistent: -1
67+
mysql.trace_mode: 'Off'
68+
MySQLi:
69+
mysqli.allow_persistent: 'On'
70+
mysqli.cache_size: 2000
71+
mysqli.default_port: 3306
72+
mysqli.max_links: -1
73+
mysqli.max_persistent: -1
74+
mysqli.reconnect: 'Off'
75+
ODBC:
76+
odbc.allow_persistent: 'On'
77+
odbc.check_persistent: 'On'
78+
odbc.defaultbinmode: 1
79+
odbc.defaultlrl: 4096
80+
odbc.max_links: '-1'
81+
odbc.max_persistent: '-1'
82+
PHP:
83+
allow_url_fopen: 'On'
84+
allow_url_include: 'Off'
85+
asp_tags: 'Off'
86+
auto_globals_jit: 'On'
87+
default_mimetype: '"text/html"'
88+
default_socket_timeout: 60
89+
disable_functions:
90+
- pcntl_alarm
91+
- pcntl_fork
92+
- pcntl_waitpid
93+
- pcntl_wait
94+
- pcntl_wifexited
95+
- pcntl_wifstopped
96+
- pcntl_wifsignaled
97+
- pcntl_wexitstatus
98+
- pcntl_wtermsig
99+
- pcntl_wstopsig
100+
- pcntl_signal
101+
- pcntl_signal_dispatch
102+
- pcntl_get_last_error
103+
- pcntl_strerror
104+
- pcntl_sigprocmask
105+
- pcntl_sigwaitinfo
106+
- pcntl_sigtimedwait
107+
- pcntl_exec
108+
- pcntl_getpriority
109+
- pcntl_setpriority
110+
display_errors: 'Off'
111+
display_startup_errors: 'Off'
112+
enable_dl: 'Off'
113+
engine: 'On'
114+
error_reporting:
115+
- E_ALL
116+
- ~E_DEPRECATED
117+
- ~E_STRICT
118+
expose_php: 'On'
119+
file_uploads: 'On'
120+
html_errors: 'On'
121+
ignore_repeated_errors: 'Off'
122+
ignore_repeated_source: 'Off'
123+
implicit_flush: 'Off'
124+
log_errors: 'On'
125+
log_errors_max_len: 1024
126+
max_execution_time: 30
127+
max_file_uploads: 20
128+
max_input_nesting_level: 64
129+
max_input_time: 60
130+
max_input_vars: 1000
131+
memory_limit: 128M
132+
output_buffering: 4096
133+
post_max_size: 8M
134+
precision: 14
135+
register_argc_argv: 'Off'
136+
report_memleaks: 'On'
137+
request_order: GP
138+
serialize_precision: 17
139+
short_open_tag: 'Off'
140+
track_errors: 'Off'
141+
upload_max_filesize: 2M
142+
variables_order: GPCS
143+
zend.enable_gc: 'On'
144+
zlib.output_compression: 'Off'
145+
Pdo_mysql:
146+
pdo_mysql.cache_size: 2000
147+
PostgreSQL:
148+
pgsql.allow_persistent: 'On'
149+
pgsql.auto_reset_persistent: 'Off'
150+
pgsql.ignore_notice: 0
151+
pgsql.log_notice: 0
152+
pgsql.max_links: -1
153+
pgsql.max_persistent: -1
154+
SQL:
155+
sql.safe_mode: 'Off'
156+
Session:
157+
session.auto_start: 0
158+
session.bug_compat_42: 'Off'
159+
session.bug_compat_warn: 'Off'
160+
session.cache_expire: '180'
161+
session.cache_limiter: nocache
162+
session.cookie_lifetime: 0
163+
session.cookie_path: /
164+
session.gc_divisor: 1000
165+
session.gc_maxlifetime: 1440
166+
session.gc_probability: 0
167+
session.hash_bits_per_character: 5
168+
session.hash_function: 0
169+
session.name: PHPSESSID
170+
session.save_handler: files
171+
session.serialize_handler: php
172+
session.use_cookies: 1
173+
session.use_only_cookies: 1
174+
session.use_strict_mode: 0
175+
session.use_trans_sid: 0
176+
url_rewriter.tags: '"a=href,area=href,frame=src,input=src,form=fakeentry"'
177+
Sybase-CT:
178+
sybct.allow_persistent: 'On'
179+
sybct.max_links: -1
180+
sybct.max_persistent: -1
181+
sybct.min_client_severity: 10
182+
sybct.min_server_severity: 10
183+
Tidy:
184+
tidy.clean_output: 'Off'
185+
bcmath:
186+
bcmath.scale: 0
187+
ldap:
188+
ldap.max_links: -1
189+
mail function:
190+
SMTP: localhost
191+
mail.add_x_header: 'On'
192+
mysqlnd:
193+
mysqlnd.collect_memory_statistics: 'Off'
194+
mysqlnd.collect_statistics: 'On'
195+
soap:
196+
soap.wsdl_cache_dir: '"/tmp"'
197+
soap.wsdl_cache_enabled: 1
198+
soap.wsdl_cache_limit: 5
199+
soap.wsdl_cache_ttl: 86400
200+
lookup:
201+
apache2:
202+
ini: /usr/local/etc/php.ini
203+
module_config: /usr/local/etc/apache24/modules.d/050_mod_php.conf
204+
name: apache24
205+
cli:
206+
ini: /usr/local/etc/php.ini
207+
composer:
208+
required_modules:
209+
- filter
210+
- json
211+
- mbstring
212+
- openssl
213+
- phar
214+
fpm:
215+
conf: /usr/local/etc/php-fpm.conf
216+
defaults:
217+
global:
218+
error_log: log/php-fpm.log
219+
pid: run/php-fpm.pid
220+
include: /usr/local/etc/php-fpm.d/*.conf
221+
group: wheel
222+
ini: /usr/local/etc/php.ini
223+
pools: /usr/local/etc/php-fpm.d
224+
service: php-fpm
225+
user: root
226+
pkgs:
227+
apache2: mod_php74
228+
cli: php74
229+
composer_bin: composer
230+
ctype: php74-ctype
231+
curl: php74-curl
232+
dom: php74-dom
233+
fileinfo: php74-fileinfo
234+
filter: php74-filter
235+
fpm: php74
236+
gd: php74-gd
237+
hash: php74-hash
238+
iconv: php74-iconv
239+
intl: php74-intl
240+
json: php74-json
241+
local_bin: /usr/local/bin
242+
mbstring: php74-mbstring
243+
mcrypt: php74-mcrypt
244+
memcached: php74-pecl-memcached
245+
mysql: php74-mysqli
246+
opcache: php74-opcache
247+
openssl: php74-openssl
248+
pdo: php74-pdo
249+
pdo_mysql: php74-pdo_mysql
250+
pear: php74-pear
251+
phar: php74-phar
252+
php: php74
253+
posix: php74-posix
254+
session: php74-session
255+
simplexml: php74-simplexml
256+
snmp: php74-snmp
257+
temp_dir: /tmp
258+
tokenizer: php74-tokenizer
259+
xdebug: php74-pecl-xdebug
260+
xml: php74-xml
261+
xmlwriter: php74-xmlwriter
262+
zip: php74-zip
263+
version:
264+
- '7.4'
265+
- '8.0'
266+
xcache:
267+
ini:
268+
defaults:
269+
xcache:
270+
xcache.cacher: 'On'
271+
xcache.coredump_directory: '""'
272+
xcache.coredump_type: '0'
273+
xcache.count: '1'
274+
xcache.disable_on_crash: 'Off'
275+
xcache.experimental: 'Off'
276+
xcache.gc_interval: '0'
277+
xcache.mmap_path: '"/dev/zero"'
278+
xcache.optimizer: 'Off'
279+
xcache.readonly_protection: 'Off'
280+
xcache.shm_scheme: '"mmap"'
281+
xcache.size: 60M
282+
xcache.slots: 8K
283+
xcache.stat: 'On'
284+
xcache.ttl: '0'
285+
xcache.var_count: '1'
286+
xcache.var_gc_interval: '300'
287+
xcache.var_maxttl: '0'
288+
xcache.var_namespace: '""'
289+
xcache.var_namespace_mode: '0'
290+
xcache.var_size: 4M
291+
xcache.var_slots: 8K
292+
xcache.var_ttl: '0'
293+
xcache-common:
294+
extension: xcache.so
295+
xcache.admin:
296+
xcache.admin.enable_auth: 'On'
297+
xcache.coverager:
298+
xcache.coveragedump_directory: '""'
299+
xcache.coverager: 'Off'
300+
xcache.coverager_autostart: 'On'
301+
opts: {}
302+
settings: {}

0 commit comments

Comments
 (0)