Skip to content

Commit

Permalink
test: different python version on rhel8
Browse files Browse the repository at this point in the history
fix: linter
  • Loading branch information
teluq-pbrideau committed Dec 5, 2023
1 parent d428ba2 commit d37799b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
6 changes: 6 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
"18.04",
"20.04"
]
},
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"8"
]
}
],
"requirements": [
Expand Down
36 changes: 36 additions & 0 deletions spec/classes/apache/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppetboard::apache::vhost default params on redhat-8-x86_64 with python_versions 3.6 is expected to contain Class[apache::mod::wsgi] with package_name => "python3-mod_wsgi" Failure/Error: it { is_expected.to contain_class('apache::mod::wsgi').with(package_name: package_name) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, Starting with Puppetboard 5.0.0 providing own $secret_key is required. See https://github.com/voxpupuli/puppetboard/issues/721 for more info. If you run Puppetboard on a single node with static FQDN then you can set it the following code to generate a random but not changing value: ${fqdn_rand_string(32)} (file: /home/runner/work/puppet-puppetboard/puppet-puppetboard/spec/fixtures/modules/puppetboard/manifests/init.pp, line: 117, column: 7) on node fv-az891-76.3qows1xflhlezoxdqozyuy3a1h.bx.internal.cloudapp.net

Check failure on line 68 in spec/classes/apache/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppetboard::apache::vhost default params on redhat-8-x86_64 with python_versions 3.8 is expected to contain Class[apache::mod::wsgi] with package_name => "python38-mod_wsgi" Failure/Error: it { is_expected.to contain_class('apache::mod::wsgi').with(package_name: package_name) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, Starting with Puppetboard 5.0.0 providing own $secret_key is required. See https://github.com/voxpupuli/puppetboard/issues/721 for more info. If you run Puppetboard on a single node with static FQDN then you can set it the following code to generate a random but not changing value: ${fqdn_rand_string(32)} (file: /home/runner/work/puppet-puppetboard/puppet-puppetboard/spec/fixtures/modules/puppetboard/manifests/init.pp, line: 117, column: 7) on node fv-az891-76.3qows1xflhlezoxdqozyuy3a1h.bx.internal.cloudapp.net

Check failure on line 68 in spec/classes/apache/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppetboard::apache::vhost default params on redhat-8-x86_64 with python_versions 3.9 is expected to contain Class[apache::mod::wsgi] with package_name => "python39-mod_wsgi" Failure/Error: it { is_expected.to contain_class('apache::mod::wsgi').with(package_name: package_name) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, Starting with Puppetboard 5.0.0 providing own $secret_key is required. See https://github.com/voxpupuli/puppetboard/issues/721 for more info. If you run Puppetboard on a single node with static FQDN then you can set it the following code to generate a random but not changing value: ${fqdn_rand_string(32)} (file: /home/runner/work/puppet-puppetboard/puppet-puppetboard/spec/fixtures/modules/puppetboard/manifests/init.pp, line: 117, column: 7) on node fv-az891-76.3qows1xflhlezoxdqozyuy3a1h.bx.internal.cloudapp.net

Check failure on line 68 in spec/classes/apache/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppetboard::apache::vhost default params on redhat-8-x86_64 with python_versions 3.6 is expected to contain Class[apache::mod::wsgi] with package_name => "python3-mod_wsgi" Failure/Error: it { is_expected.to contain_class('apache::mod::wsgi').with(package_name: package_name) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, Starting with Puppetboard 5.0.0 providing own $secret_key is required. See https://github.com/voxpupuli/puppetboard/issues/721 for more info. If you run Puppetboard on a single node with static FQDN then you can set it the following code to generate a random but not changing value: ${fqdn_rand_string(32)} (file: /home/runner/work/puppet-puppetboard/puppet-puppetboard/spec/fixtures/modules/puppetboard/manifests/init.pp, line: 117, column: 7) on node fv-az891-76.3qows1xflhlezoxdqozyuy3a1h.bx.internal.cloudapp.net

Check failure on line 68 in spec/classes/apache/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppetboard::apache::vhost default params on redhat-8-x86_64 with python_versions 3.8 is expected to contain Class[apache::mod::wsgi] with package_name => "python38-mod_wsgi" Failure/Error: it { is_expected.to contain_class('apache::mod::wsgi').with(package_name: package_name) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, Starting with Puppetboard 5.0.0 providing own $secret_key is required. See https://github.com/voxpupuli/puppetboard/issues/721 for more info. If you run Puppetboard on a single node with static FQDN then you can set it the following code to generate a random but not changing value: ${fqdn_rand_string(32)} (file: /home/runner/work/puppet-puppetboard/puppet-puppetboard/spec/fixtures/modules/puppetboard/manifests/init.pp, line: 117, column: 7) on node fv-az891-76.3qows1xflhlezoxdqozyuy3a1h.bx.internal.cloudapp.net

Check failure on line 68 in spec/classes/apache/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppetboard::apache::vhost default params on redhat-8-x86_64 with python_versions 3.9 is expected to contain Class[apache::mod::wsgi] with package_name => "python39-mod_wsgi" Failure/Error: it { is_expected.to contain_class('apache::mod::wsgi').with(package_name: package_name) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, Starting with Puppetboard 5.0.0 providing own $secret_key is required. See https://github.com/voxpupuli/puppetboard/issues/721 for more info. If you run Puppetboard on a single node with static FQDN then you can set it the following code to generate a random but not changing value: ${fqdn_rand_string(32)} (file: /home/runner/work/puppet-puppetboard/puppet-puppetboard/spec/fixtures/modules/puppetboard/manifests/init.pp, line: 117, column: 7) on node fv-az891-76.3qows1xflhlezoxdqozyuy3a1h.bx.internal.cloudapp.net
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

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppetboard::apache::vhost default params on redhat-8-x86_64 with unsupported python_versions is expected to raise Puppet::Error with message matching /python version not supported/ Failure/Error: it { is_expected.to raise_error(Puppet::Error, %r{python version not supported}) } expected Puppet::Error with message matching /python version not supported/, got #<Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, Starting with ...t.pp, line: 117, column: 7) on node fv-az891-76.3qows1xflhlezoxdqozyuy3a1h.bx.internal.cloudapp.net> with backtrace: # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/parser/functions/fail.rb:11:in `block in get_binding' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/parser/functions.rb:216:in `block (2 levels) in newfunction' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/util/profiler/around_profiler.rb:59:in `profile' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/util/profiler.rb:52:in `profile' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/parser/functions.rb:209:in `block in newfunction' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/functions.rb:752:in `block in call' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/functions.rb:749:in `catch' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/functions.rb:749:in `call' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/puppet_stack.rb:43:in `stack' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/runtime3_support.rb:306:in `block in call_function' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/util/profiler/around_profiler.rb:59:in `profile' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/util/profiler.rb:52:in `profile' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/runtime3_support.rb:304:in `call_function' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:996:in `call_function_with_block' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:965:in `eval_CallNamedFunctionExpression' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/visitor.rb:95:in `visit_this_1' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:82:in `evaluate' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:1059:in `block in eval_IfExpression' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/parser/scope.rb:990:in `with_guarded_scope' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:1057:in `eval_IfExpression' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/visitor.rb:95:in `visit_this_1' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:82:in `evaluate' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:680:in `block in eval_BlockExpression' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:680:in `each' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:680:in `reduce' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:680:in `eval_BlockExpression' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/visitor.rb:95:in `visit_this_1' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:82:in `evaluate' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:1059:in `block in eval_IfExpression' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/parser/scope.rb:990:in `with_guarded_scope' # ./vendor/bundle/ruby/3.2.0/gems/puppet-8.3.1/lib/puppet/pops/evaluator/evaluator_impl.rb:1057:in `eval_IfExpression' # ./vendor/bundle/ru

Check failure on line 82 in spec/classes/apache/vhost_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppetboard::apache::vhost default params on redhat-8-x86_64 with unsupported python_versions is expected to raise Puppet::Error with message matching /python version not supported/ Failure/Error: it { is_expected.to raise_error(Puppet::Error, %r{python version not supported}) } expected Puppet::Error with message matching /python version not supported/, got #<Puppet::PreformattedError: Evaluation Error: Error while evaluating a Function Call, Starting with ...t.pp, line: 117, column: 7) on node fv-az891-76.3qows1xflhlezoxdqozyuy3a1h.bx.internal.cloudapp.net> with backtrace: # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/parser/functions/fail.rb:10:in `block in get_binding' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/parser/functions.rb:215:in `block (2 levels) in newfunction' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/util/profiler/around_profiler.rb:58:in `profile' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/util/profiler.rb:51:in `profile' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/parser/functions.rb:208:in `block in newfunction' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/functions.rb:751:in `block in call' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/functions.rb:748:in `catch' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/functions.rb:748:in `call' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/puppet_stack.rb:42:in `stack' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/runtime3_support.rb:305:in `block in call_function' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/util/profiler/around_profiler.rb:58:in `profile' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/util/profiler.rb:51:in `profile' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/runtime3_support.rb:303:in `call_function' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:995:in `call_function_with_block' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:964:in `eval_CallNamedFunctionExpression' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/visitor.rb:94:in `visit_this_1' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:1058:in `block in eval_IfExpression' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/parser/scope.rb:985:in `with_guarded_scope' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:1056:in `eval_IfExpression' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/visitor.rb:94:in `visit_this_1' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:679:in `block in eval_BlockExpression' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:679:in `each' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:679:in `reduce' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:679:in `eval_BlockExpression' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/visitor.rb:94:in `visit_this_1' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:1058:in `block in eval_IfExpression' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/parser/scope.rb:985:in `with_guarded_scope' # ./vendor/bundle/ruby/2.7.0/gems/puppet-7.27.0/lib/puppet/pops/evaluator/evaluator_impl.rb:1056:in `eval_IfExpre
end
end
end
end
end
Expand Down

0 comments on commit d37799b

Please sign in to comment.