|
3 | 3 |
|
4 | 4 | describe 'puppet' do |
5 | 5 | on_supported_os.each do |os, facts| |
6 | | - next if unsupported_puppetserver_osfamily(facts[:osfamily]) |
| 6 | + next if unsupported_puppetserver_osfamily(facts[:os]['family']) |
7 | 7 | context "on #{os}" do |
8 | 8 | let(:facts) do |
9 | 9 | facts |
|
26 | 26 | end |
27 | 27 |
|
28 | 28 | let(:server_vardir) do |
29 | | - if ['FreeBSD', 'DragonFly'].include?(facts[:operatingsystem]) |
| 29 | + if ['FreeBSD', 'DragonFly'].include?(facts[:os]['name']) |
30 | 30 | '/var/puppet/server/data/puppetserver' |
31 | 31 | else |
32 | 32 | '/opt/puppetlabs/server/data/puppetserver' |
|
41 | 41 | .with_content(%r{^#puppetlabs.services.ca.certificate-authority-disabled-service/certificate-authority-disabled-service}) |
42 | 42 | .with_content(%r{^puppetlabs.trapperkeeper.services.watcher.filesystem-watch-service/filesystem-watch-service}) |
43 | 43 | } |
44 | | - if facts[:osfamily] == 'FreeBSD' |
| 44 | + if facts[:os]['family'] == 'FreeBSD' |
45 | 45 | it { |
46 | 46 | should contain_augeas('puppet::server::puppetserver::jvm') |
47 | 47 | .with_changes(['set puppetserver_java_opts \'"-Xms2G -Xmx2G"\'']) |
|
343 | 343 | end |
344 | 344 | end |
345 | 345 |
|
346 | | - describe 'server_max_open_files', unless: facts[:osfamily] == 'FreeBSD' do |
| 346 | + describe 'server_max_open_files', unless: facts[:os]['family'] == 'FreeBSD' do |
347 | 347 | context 'when server_max_open_files => undef' do |
348 | 348 | it do |
349 | | - if facts['service_provider'] == 'systemd' |
| 349 | + if facts[:service_provider] == 'systemd' |
350 | 350 | should contain_systemd__dropin_file('puppetserver.service-limits.conf') |
351 | 351 | .with_ensure('absent') |
352 | 352 | else |
|
360 | 360 | let(:params) { super().merge(server_max_open_files: 32143) } |
361 | 361 |
|
362 | 362 | it do |
363 | | - if facts['service_provider'] == 'systemd' |
| 363 | + if facts[:service_provider] == 'systemd' |
364 | 364 | should contain_systemd__dropin_file('puppetserver.service-limits.conf') |
365 | 365 | .with_ensure('present') |
366 | 366 | .with_filename('limits.conf') |
|
379 | 379 |
|
380 | 380 | describe 'with extra_args parameter' do |
381 | 381 | let(:params) { super().merge(server_jvm_extra_args: ['-XX:foo=bar', '-XX:bar=foo']) } |
382 | | - if facts[:osfamily] == 'FreeBSD' |
| 382 | + if facts[:os]['family'] == 'FreeBSD' |
383 | 383 | it { |
384 | 384 | should contain_augeas('puppet::server::puppetserver::jvm') |
385 | 385 | .with_changes(['set puppetserver_java_opts \'"-Xms2G -Xmx2G -XX:foo=bar -XX:bar=foo"\'']) |
|
410 | 410 | end |
411 | 411 | end |
412 | 412 |
|
413 | | - describe 'with cli_args parameter', unless: facts[:osfamily] == 'FreeBSD' do |
| 413 | + describe 'with cli_args parameter', unless: facts[:os]['family'] == 'FreeBSD' do |
414 | 414 | let(:params) { super().merge(server_jvm_cli_args: '-Djava.io.tmpdir=/var/puppettmp') } |
415 | 415 | if facts[:os]['family'] == 'RedHat' |
416 | 416 | it { |
|
441 | 441 |
|
442 | 442 | describe 'with jvm_config file parameter' do |
443 | 443 | let(:params) { super().merge(server_jvm_config: '/etc/custom/puppetserver') } |
444 | | - if facts[:osfamily] == 'FreeBSD' |
| 444 | + if facts[:os]['family'] == 'FreeBSD' |
445 | 445 | it { should contain_augeas('puppet::server::puppetserver::jvm').with_context('/files/etc/rc.conf') } |
446 | 446 | else |
447 | 447 | it do |
|
454 | 454 | end |
455 | 455 |
|
456 | 456 | describe 'gem-path' do |
457 | | - if ['FreeBSD', 'DragonFly'].include?(facts[:osfamily]) |
| 457 | + if ['FreeBSD', 'DragonFly'].include?(facts[:os]['family']) |
458 | 458 | it do |
459 | 459 | should contain_file(puppetserver_conf) |
460 | 460 | .with_content(%r{^ gem-path: \[\$\{jruby-puppet.gem-home\}, "#{server_vardir}/vendored-jruby-gems", "#{facts[:ruby]['sitedir'].sub(/site_ruby/,'gems')}"\]$}) |
|
0 commit comments