Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Puppet Litmus for acceptance testing (#79)
* Satisfy puppet-lint & rubocop 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) * Satisfy metadata-json-lint Removes warnings: pdk (WARNING): metadata-json-lint: Dependency puppet/archive has an open ended dependency version requirement >= 6.0.0 (metadata.json) * Add GitHub actions for automatic validation & testing * Use a unsupported OS for testing failing on these 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/ * Align unit tests with code 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" * Remove traces of remote_file from unit tests and .fixtures.yml 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] #69 * Remove traces of TravisCI and appveyor * Update to PDK v3.0.0 * Use Puppet Litmus for acceptance testing --------- Co-authored-by: Phil Friderici <[email protected]>
- Loading branch information