From 17ea7b323003699dac663c779f1eb1f6178ab0ed Mon Sep 17 00:00:00 2001 From: skyamgarp <130442619+skyamgarp@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:40:57 +0530 Subject: [PATCH] (CAT-2100) Add Debian 12 support (CAT-2100) Updated specs (CAT-2100) Fix failing test (CAT-2100) Fix rubocop --- metadata.json | 3 ++- spec/acceptance/mod_php_spec.rb | 3 ++- spec/classes/mod/php_spec.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/metadata.json b/metadata.json index f80bd2ec30..bc12b33c38 100644 --- a/metadata.json +++ b/metadata.json @@ -49,7 +49,8 @@ "operatingsystem": "Debian", "operatingsystemrelease": [ "10", - "11" + "11", + "12" ] }, { diff --git a/spec/acceptance/mod_php_spec.rb b/spec/acceptance/mod_php_spec.rb index 5c9f41e21f..8fd3dc9c29 100644 --- a/spec/acceptance/mod_php_spec.rb +++ b/spec/acceptance/mod_php_spec.rb @@ -20,6 +20,7 @@ class { 'apache::mod::php': } content => "\\n", } MANIFEST + it 'succeeds in puppeting php' do apply_manifest(pp, catch_failures: true) end @@ -36,7 +37,7 @@ class { 'apache::mod::php': } describe file("#{apache_hash['mod_dir']}/php7.4.conf") do it { is_expected.to contain 'DirectoryIndex index.php' } end - elsif os[:family] == 'debian' && os[:release] =~ %r{^12\.} + elsif os[:family] == 'debian' && os[:release] =~ %r{^12} describe file("#{apache_hash['mod_dir']}/php8.2.conf") do it { is_expected.to contain 'DirectoryIndex index.php' } end diff --git a/spec/classes/mod/php_spec.rb b/spec/classes/mod/php_spec.rb index 8c4e774d63..9cb56b04d7 100644 --- a/spec/classes/mod/php_spec.rb +++ b/spec/classes/mod/php_spec.rb @@ -91,7 +91,7 @@ it { expect(subject).to contain_file('php8.2.load').with( - content: "LoadModule php8_module /usr/lib/apache2/modules/libphp8.2.so\n", + content: "LoadModule php_module /usr/lib/apache2/modules/libphp8.2.so\n", ) } end