Skip to content

Commit 79deb78

Browse files
Copilotdamacus
authored andcommitted
Fix failing test suites for specific platform combinations
Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
1 parent b1ca531 commit 79deb78

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

kitchen.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ suites:
5454
- name: mod_wsgi
5555
run_list:
5656
- recipe[test::wsgi]
57-
excludes:
58-
- amazonlinux-2023
5957
- name: mod_auth_cas
6058
run_list:
6159
- recipe[test::auth_cas]

libraries/helpers.rb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,11 @@ def apache_mod_php_package
407407
when 'rhel'
408408
'mod_php'
409409
when 'suse'
410-
'apache2-mod_php7'
410+
if platform?('opensuse') && node['platform_version'].to_f >= 15.5
411+
'apache2-mod_php8'
412+
else
413+
'apache2-mod_php7'
414+
end
411415
end
412416
end
413417

@@ -444,16 +448,22 @@ def apache_mod_php_filename
444448
'libphp7.2.so'
445449
elsif platform?('ubuntu') && node['platform_version'].to_f == 20.04
446450
'libphp7.4.so'
447-
elsif platform?('ubuntu') && node['platform_version'].to_f >= 22.04
451+
elsif platform?('ubuntu') && node['platform_version'].to_f >= 22.04 && node['platform_version'].to_f < 24.04
448452
'libphp8.1.so'
453+
elsif platform?('ubuntu') && node['platform_version'].to_f >= 24.04
454+
'libphp8.3.so'
449455
else
450456
'libphp7.0.so'
451457
end
452458
when 'rhel'
453459
# TODO: Remove when we no longer support RHEL 7
454460
node['platform_version'].to_i >= 8 ? 'libphp7.so' : 'libphp5.so'
455461
when 'suse'
456-
'mod_php7.so'
462+
if platform?('opensuse') && node['platform_version'].to_f >= 15.5
463+
'mod_php8.so'
464+
else
465+
'mod_php7.so'
466+
end
457467
end
458468
end
459469

resources/mod_wsgi.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@
1919
description: 'Whether to install the Apache WSGI module package'
2020

2121
action :create do
22-
raise 'apache2_mod_wsgi resource is not supported on amazonlinux' if platform?('amazon')
23-
2422
# install mod_wsgi package (if requested)
2523
package new_resource.package_name do
26-
only_if { new_resource.install_package }
24+
only_if { new_resource.install_package && !new_resource.package_name.nil? }
2725
notifies :delete, 'directory[purge distro conf.modules.d]', :immediately
2826
end
2927

0 commit comments

Comments
 (0)