Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Puppet Litmus for acceptance testing #79

Merged
merged 9 commits into from Aug 10, 2023

Conversation

Phil-Friderici
Copy link
Contributor

Based on my PR #78.

Getting the acceptance tests to work was easier than I hoped :)
I have added all the Litmus Images that do work (see ../provision.yaml). Therefore it takes like 20 minutes to complete them all. I guess it is not needed to test them all, please decide which one to keep and to remove.

You can see the results of the tests in my fork Phil-Friderici#3

Phil Friderici added 9 commits August 10, 2023 07:45
Checks for "puppet-lint: variable contains a capital letter" are currently only ignored.
This is because it would break backward compatibility.

Removes warnings/errors:
pdk (WARNING): puppet-lint: class included by absolute name (::$class) (examples/ca.pp:1:9)
pdk (WARNING): puppet-lint: class included by absolute name (::$class) (examples/init.pp:1:9)
pdk (WARNING): puppet-lint: defined type not documented (manifests/ca.pp:38:1)
pdk (WARNING): puppet-lint: class included by absolute name (::$class) (manifests/ca.pp:49:11)
pdk (WARNING): puppet-lint: class included by absolute name (::$class) (manifests/ca.pp:50:11)
pdk (WARNING): puppet-lint: class included by absolute name (::$class) (manifests/ca.pp:51:11)
pdk (WARNING): puppet-lint: absolute class name reference (manifests/ca.pp:115:29)
pdk (WARNING): puppet-lint: absolute class name reference (manifests/ca.pp:137:29)
pdk (WARNING): puppet-lint: absolute class name reference (manifests/ca.pp:148:30)
pdk (WARNING): puppet-lint: absolute class name reference (manifests/ca.pp:159:25)
pdk (WARNING): puppet-lint: ensure set to present on file resource (manifests/ca.pp:109:23)
pdk (WARNING): puppet-lint: ensure set to present on file resource (manifests/ca.pp:131:23)
pdk (WARNING): puppet-lint: ensure set to present on file resource (manifests/ca.pp:142:24)
pdk (ERROR): puppet-lint: there should be a single space or newline before a closing brace (manifests/ca.pp:165:4)
pdk (ERROR): puppet-lint: there should be a single space or single newline after an opening brace (manifests/ca.pp:48:1)
pdk (WARNING): puppet-lint: missing documentation for defined type parameter ca_cert::ca::ca_file_group (manifests/ca.pp:45:20)
pdk (WARNING): puppet-lint: missing documentation for defined type parameter ca_cert::ca::ca_file_group (manifests/ca.pp:45:20)
pdk (ERROR): puppet-lint: there should be a single space or newline before a closing brace (manifests/enable.pp:23:4)
pdk (ERROR): puppet-lint: there should be a single space or single newline after an opening brace (manifests/enable.pp:3:1)
pdk (WARNING): puppet-lint: class included by absolute name (::$class) (manifests/init.pp:54:11)
pdk (WARNING): puppet-lint: class included by absolute name (::$class) (manifests/init.pp:55:11)
pdk (ERROR): puppet-lint: there should be a single space or single newline after an opening brace (manifests/init.pp:53:1)
pdk (WARNING): puppet-lint: variable contains a capital letter (manifests/init.pp:46:11)
pdk (WARNING): puppet-lint: variable contains a capital letter (manifests/init.pp:73:16)
pdk (WARNING): puppet-lint: variable contains a capital letter (manifests/init.pp:74:16)
pdk (ERROR): puppet-lint: there should be a single space before an opening brace (manifests/params.pp:47:57)
pdk (ERROR): puppet-lint: there should be a single space before an opening brace (manifests/params.pp:76:67)
pdk (ERROR): puppet-lint: there should be a single space or newline before a closing brace (manifests/update.pp:12:4)
pdk (ERROR): puppet-lint: there should be a single space or single newline after an opening brace (manifests/update.pp:3:1)

pdk (WARNING): rubocop: Unnecessary disabling of `RSpec/VoidExpect`. (spec/defines/ca_spec.rb:2:1)
Removes warnings:
pdk (WARNING): metadata-json-lint: Dependency puppet/archive has an open ended dependency version requirement >= 6.0.0 (metadata.json)
Removes errors:
rspec ./spec/classes/ca_cert_spec.rb:192 # ca_cert on a Solaris based OS is expected to raise Puppet::Error with message matching /Unsupported osfamily/
rspec ./spec/classes/params_spec.rb:60 # ca_cert::params on an unsupported operating system is expected to raise Puppet::Error with message matching /Unsupported osfamily/
The code is only executed on osfamily RedHat with major version below 7.
The unit tests did only skip the tests on RedHat 7 but not on 8.

Removes errors:
rspec './spec/classes/update_spec.rb[1:9:3:1]' # ca_cert::update on redhat-8-x86_64 with force_enable set to true is expected to contain Exec[enable_ca_trust] with command => "update-ca-trust force-enable"
rspec './spec/classes/update_spec.rb[1:9:4:1]' # ca_cert::update on redhat-8-x86_64 with force_enable set to false is expected to contain Exec[enable_ca_trust] with command => "update-ca-trust enable"
When remote_file got replaced by archive [1] the unit tests were not updated accordingly.

Removes errors.
rspec ./spec/defines/ca_spec.rb:141 # ca_cert::ca os-dependent items On Debian based systems with a remote certificate is expected to contain Remote_file[/usr/local/share/ca-certificates/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt"
rspec ./spec/defines/ca_spec.rb:202 # ca_cert::ca os-dependent items On RedHat based systems with a remote certificate is expected to contain Remote_file[/etc/pki/ca-trust/source/anchors/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt"
rspec ./spec/defines/ca_spec.rb:246 # ca_cert::ca os-dependent items On RedHat based systems when explicitly distrusting a certificate is expected to contain Remote_file[/etc/pki/ca-trust/source/blacklist/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt"
rspec ./spec/defines/ca_spec.rb:273 # ca_cert::ca os-dependent items On Suse 11 based systems with a remote certificate is expected to contain Remote_file[/etc/ssl/certs/Globalsign_Org_Intermediate.pem] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.pem"
rspec ./spec/defines/ca_spec.rb:347 # ca_cert::ca os-dependent items On Suse 12 based systems with a remote certificate is expected to contain Remote_file[/etc/pki/trust/anchors/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt"
rspec ./spec/defines/ca_spec.rb:393 # ca_cert::ca os-dependent items On Suse 12 based systems when explicitly distrusting a certificate is expected to contain Remote_file[/etc/pki/trust/blacklist/Globalsign_Org_Intermediate.crt] with ensure => "present" and source => "http://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt"

[1] voxpupuli#69
@pcfens pcfens merged commit e2187a9 into voxpupuli:master Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants