Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning- committed May 28, 2024
1 parent d426d75 commit 9ddf720
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'puppet_litmus'
require 'spec_helper_acceptance_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_acceptance_local.rb'))

PuppetLitmus.configure!

require 'spec_helper_acceptance_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_acceptance_local.rb'))
59 changes: 58 additions & 1 deletion spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: '8.1'
mysql::server::root_password: 'strongpassword'
EOS
else
<<-EOS
---
# Created by puppet litmus
php::composer: true
Expand All @@ -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')) {
Expand Down

0 comments on commit 9ddf720

Please sign in to comment.