From d3518fbb850bb5252e0e18979bf3e25250f9a003 Mon Sep 17 00:00:00 2001 From: Lightning Date: Tue, 21 May 2024 15:13:44 +0200 Subject: [PATCH] fix unit tests --- spec/spec_helper_acceptance_local.rb | 59 +++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 699e86e..e653fde 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -29,7 +29,62 @@ def create_remote_file(name, dest_filepath, file_content) path: "common.yaml" EOS -hiera_data_content = <<-EOS +# rubocop:disable all +hiera_data_content = if os[:family].eql?('debian') +<<-EOS +--- +# Created by puppet litmus +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: '7.4' +mysql::server::root_password: 'strongpassword' +EOS +elsif os[:family].eql?('ubuntu') +<<-EOS +--- +# Created by puppet litmus +php::composer: true +php::extensions: + bcmath: {} + dba: {} + gd: {} + gmp: {} + intl: {} + json: {} + ldap: {} + mbstring: {} + mysqlnd: {} + opcache: {} + pdo: {} + process: {} + 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 +else +<<-EOS --- # Created by puppet litmus php::composer: true @@ -55,6 +110,8 @@ def create_remote_file(name, dest_filepath, file_content) php::globals::php_version: '7.4' mysql::server::root_password: 'strongpassword' EOS +end +# rubocop:enable all setup_php_pp = <<-EOS if (($facts['os']['family'] == 'RedHat') and ($facts['os']['release']['major'] == '8')) {