-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
fix: linter
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,42 @@ | |
'ensure' => 'file' | ||
) | ||
end | ||
|
||
if ['RedHat'].include?(facts[:os]['family']) | ||
['3.6', '3.8', '3.9'].each do |python_version| | ||
context "with python_versions #{python_version}" do | ||
let(:pre_condition) do | ||
[ | ||
"class { 'puppetboard': python_version => \"#{python_version}\", }" | ||
] | ||
end | ||
|
||
case python_version | ||
when '3.6' | ||
package_name = 'python3-mod_wsgi' | ||
when '3.8' | ||
package_name = 'python38-mod_wsgi' | ||
when '3.9' | ||
package_name = 'python39-mod_wsgi' | ||
end | ||
|
||
it { is_expected.to contain_class('apache::mod::wsgi').with(package_name: package_name) } | ||
Check failure on line 68 in spec/classes/apache/vhost_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 68 in spec/classes/apache/vhost_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 68 in spec/classes/apache/vhost_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 68 in spec/classes/apache/vhost_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 68 in spec/classes/apache/vhost_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 68 in spec/classes/apache/vhost_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
|
||
end | ||
end | ||
|
||
context 'with unsupported python_versions' do | ||
let(:pre_condition) do | ||
[ | ||
"class { 'puppetboard': | ||
python_version => '3.7', | ||
} | ||
" | ||
] | ||
end | ||
|
||
it { is_expected.to raise_error(Puppet::Error, %r{python version not supported}) } | ||
Check failure on line 82 in spec/classes/apache/vhost_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 82 in spec/classes/apache/vhost_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
|
||
end | ||
end | ||
end | ||
end | ||
end | ||
|