|
59 | 59 | .with_incl('/etc/default/puppetserver') |
60 | 60 | .with_lens('Shellvars.lns') |
61 | 61 | } |
62 | | - it { |
63 | | - should contain_augeas('puppet::server::puppetserver::jvm') |
64 | | - .with_changes(['set JAVA_ARGS \'"-Xms2G -Xmx2G"\'', 'set JAVA_BIN /usr/bin/java']) |
65 | | - .with_context('/files/etc/default/puppetserver') |
66 | | - .with_incl('/etc/default/puppetserver') |
67 | | - .with_lens('Shellvars.lns') |
68 | | - } |
| 62 | + if facts[:os]['family'] == 'RedHat' and facts[:os]['release']['major'] == '8' |
| 63 | + it { |
| 64 | + should contain_augeas('puppet::server::puppetserver::jvm') |
| 65 | + .with_changes(['set JAVA_ARGS \'"-Xms2G -Xmx2G -Dcom.redhat.fips=false"\'', 'set JAVA_BIN /usr/bin/java']) |
| 66 | + .with_context('/files/etc/default/puppetserver') |
| 67 | + .with_incl('/etc/default/puppetserver') |
| 68 | + .with_lens('Shellvars.lns') |
| 69 | + } |
| 70 | + else |
| 71 | + it { |
| 72 | + should contain_augeas('puppet::server::puppetserver::jvm') |
| 73 | + .with_changes(['set JAVA_ARGS \'"-Xms2G -Xmx2G"\'', 'set JAVA_BIN /usr/bin/java']) |
| 74 | + .with_context('/files/etc/default/puppetserver') |
| 75 | + .with_incl('/etc/default/puppetserver') |
| 76 | + .with_lens('Shellvars.lns') |
| 77 | + } |
| 78 | + end |
69 | 79 | it do |
70 | 80 | should contain_augeas('puppet::server::puppetserver::jruby_jar') |
71 | 81 | .with_changes(['rm JRUBY_JAR']) |
|
374 | 384 | .with_changes(['set puppetserver_java_opts \'"-Xms2G -Xmx2G -XX:foo=bar -XX:bar=foo"\'']) |
375 | 385 | .with_context('/files/etc/rc.conf') |
376 | 386 | } |
| 387 | + elsif facts[:os]['family'] == 'RedHat' and facts[:os]['release']['major'] == '8' |
| 388 | + it { |
| 389 | + should contain_augeas('puppet::server::puppetserver::jvm') |
| 390 | + .with_changes([ |
| 391 | + 'set JAVA_ARGS \'"-Xms2G -Xmx2G -Dcom.redhat.fips=false -XX:foo=bar -XX:bar=foo"\'', |
| 392 | + 'set JAVA_BIN /usr/bin/java' |
| 393 | + ]) |
| 394 | + .with_context('/files/etc/default/puppetserver') |
| 395 | + .with_incl('/etc/default/puppetserver') |
| 396 | + .with_lens('Shellvars.lns') |
| 397 | + } |
377 | 398 | else |
378 | 399 | it { |
379 | 400 | should contain_augeas('puppet::server::puppetserver::jvm') |
|
390 | 411 |
|
391 | 412 | describe 'with cli_args parameter', unless: facts[:osfamily] == 'FreeBSD' do |
392 | 413 | let(:params) { super().merge(server_jvm_cli_args: '-Djava.io.tmpdir=/var/puppettmp') } |
393 | | - it do |
394 | | - should contain_augeas('puppet::server::puppetserver::jvm') |
395 | | - .with_changes([ |
396 | | - 'set JAVA_ARGS \'"-Xms2G -Xmx2G"\'', |
397 | | - 'set JAVA_BIN /usr/bin/java', |
398 | | - 'set JAVA_ARGS_CLI \'"-Djava.io.tmpdir=/var/puppettmp"\'' |
399 | | - ]) |
400 | | - .with_context('/files/etc/default/puppetserver') |
401 | | - .with_incl('/etc/default/puppetserver') |
402 | | - .with_lens('Shellvars.lns') |
| 414 | + if facts[:os]['family'] == 'RedHat' and facts[:os]['release']['major'] == '8' |
| 415 | + it { |
| 416 | + should contain_augeas('puppet::server::puppetserver::jvm') |
| 417 | + .with_changes([ |
| 418 | + 'set JAVA_ARGS \'"-Xms2G -Xmx2G -Dcom.redhat.fips=false"\'', |
| 419 | + 'set JAVA_BIN /usr/bin/java', |
| 420 | + 'set JAVA_ARGS_CLI \'"-Djava.io.tmpdir=/var/puppettmp"\'' |
| 421 | + ]) |
| 422 | + .with_context('/files/etc/default/puppetserver') |
| 423 | + .with_incl('/etc/default/puppetserver') |
| 424 | + .with_lens('Shellvars.lns') |
| 425 | + } |
| 426 | + else |
| 427 | + it { |
| 428 | + should contain_augeas('puppet::server::puppetserver::jvm') |
| 429 | + .with_changes([ |
| 430 | + 'set JAVA_ARGS \'"-Xms2G -Xmx2G"\'', |
| 431 | + 'set JAVA_BIN /usr/bin/java', |
| 432 | + 'set JAVA_ARGS_CLI \'"-Djava.io.tmpdir=/var/puppettmp"\'' |
| 433 | + ]) |
| 434 | + .with_context('/files/etc/default/puppetserver') |
| 435 | + .with_incl('/etc/default/puppetserver') |
| 436 | + .with_lens('Shellvars.lns') |
| 437 | + } |
403 | 438 | end |
404 | 439 | end |
405 | 440 |
|
|
0 commit comments