voxpupuli / puppet-nginx

Puppet Module to manage NGINX on various UNIXes
https://forge.puppet.com/puppet/nginx
MIT License
470 stars 881 forks source link

nginx package spectest failing #1190

Closed JacobHenner closed 6 years ago

JacobHenner commented 6 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

Execute Travis build against master.

What are you seeing

rspec is failing, since it expects the package "nginx" to be installed on Arch Linux:

else
  it { is_expected.to contain_package('nginx') }
end

However, in params.pp, the package_name is masked by override value "nginx-mainline":

'ArchLinux': {
      $_module_os_overrides = {
        'pid'          => false,
        'daemon_user'  => 'http',
        'log_group'    => 'log',
        'package_name' => 'nginx-mainline',
      }
    }

Output log

Failures:
  1) nginx on archlinux-4-x86_64 nginx::package should contain Package[nginx]
     Failure/Error: it { is_expected.to contain_package('nginx') }
       expected that the catalogue would contain Package[nginx]
     # ./spec/classes/nginx_spec.rb:169:in `block (5 levels) in <top (required)>'
Finished in 9 minutes 11 seconds (files took 19.44 seconds to load)
3457 examples, 1 failure
Failed examples:
rspec ./spec/classes/nginx_spec.rb[1:1:2:1] # nginx on archlinux-4-x86_64 nginx::package should contain Package[nginx]
JacobHenner commented 6 years ago

Unless I've missed something, it looks like rerunning the Travis build against the current master would result in this failure. Still looking into the cause, since Travis reports that tests of the latest commit succeeded when it was run a few days back.

bastelfreak commented 6 years ago

fixed by https://github.com/voxpupuli/puppet-nginx/pull/1191