From 2cb6dedd9a64a7c15e6301affe1cb7cf630248f3 Mon Sep 17 00:00:00 2001 From: Lightning Date: Fri, 26 Jul 2024 13:19:26 +0200 Subject: [PATCH] fix unit tests --- spec/spec_helper_acceptance_local.rb | 94 +++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 10 deletions(-) diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 029118e..c56a8b6 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -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: {} @@ -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: {} @@ -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: {} @@ -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