Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning- committed Jul 26, 2024
1 parent 98d6cd4 commit 2cb6ded
Showing 1 changed file with 84 additions and 10 deletions.
94 changes: 84 additions & 10 deletions spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def create_remote_file(name, dest_filepath, file_content)
EOS

# rubocop:disable all
hiera_data_content = if os[:family].eql?('debian')
<<-EOS
if os[:family].eql?('debian')
if os[:release].to_i == 11
hiera_data_content = <<-EOS
---
# Created by puppet litmus
php::composer: true
php::extensions:
bcmath: {}
Expand All @@ -55,11 +55,61 @@ def create_remote_file(name, dest_filepath, file_content)
'PHP/memory_limit': '768M'
php::globals::php_version: '7.4'
mysql::server::root_password: 'strongpassword'
EOS
EOS
elsif os[:release].to_i == 12
hiera_data_content = <<-EOS
---
php::composer: true
php::extensions:
bcmath: {}
dba: {}
gd: {}
gmp: {}
intl: {}
json: {}
ldap: {}
mbstring: {}
mysqlnd: {}
opcache: {}
pdo: {}
xml: {}
zip: {}
php::fpm: false
php::manage_repos: false
php::settings:
'PHP/memory_limit': '768M'
php::globals::php_version: '8.2'
mysql::server::root_password: 'strongpassword'
EOS
end
elsif os[:family].eql?('ubuntu')
<<-EOS
if os[:release].to_i == 20
hiera_data_content = <<-EOS
---
php::composer: true
php::extensions:
bcmath: {}
dba: {}
gd: {}
gmp: {}
intl: {}
ldap: {}
mbstring: {}
mysqlnd: {}
opcache: {}
pdo: {}
xml: {}
zip: {}
php::fpm: false
php::manage_repos: false
php::settings:
'PHP/memory_limit': '768M'
php::globals::php_version: '7.4'
mysql::server::root_password: 'strongpassword'
EOS
elsif os[:release].to_i == 22
hiera_data_content = <<-EOS
---
# Created by puppet litmus
php::composer: true
php::extensions:
bcmath: {}
Expand All @@ -80,11 +130,35 @@ def create_remote_file(name, dest_filepath, file_content)
'PHP/memory_limit': '768M'
php::globals::php_version: '8.1'
mysql::server::root_password: 'strongpassword'
EOS
EOS
elsif os[:release].to_i == 24
hiera_data_content = <<-EOS
---
php::composer: true
php::extensions:
bcmath: {}
dba: {}
gd: {}
gmp: {}
intl: {}
ldap: {}
mbstring: {}
mysqlnd: {}
opcache: {}
pdo: {}
xml: {}
zip: {}
php::fpm: false
php::manage_repos: false
php::settings:
'PHP/memory_limit': '768M'
php::globals::php_version: '8.3'
mysql::server::root_password: 'strongpassword'
EOS
end
else
<<-EOS
hiera_data_content = <<-EOS
---
# Created by puppet litmus
php::composer: true
php::extensions:
bcmath: {}
Expand All @@ -107,7 +181,7 @@ def create_remote_file(name, dest_filepath, file_content)
'PHP/memory_limit': '768M'
php::globals::php_version: '7.4'
mysql::server::root_password: 'strongpassword'
EOS
EOS
end
# rubocop:enable all

Expand Down

0 comments on commit 2cb6ded

Please sign in to comment.