Skip to content

Commit

Permalink
fix all STRICT_VARIABLES failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Haughton committed Aug 15, 2016
1 parent 46cb1bd commit 3408602
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#
# This class file is not called directly
class nginx::service(
$configtest_enable = $::nginx::configtest_enable,
$service_restart = $::nginx::service_restart,
$service_ensure = $::nginx::service_ensure,
$configtest_enable = false,
$service_restart = '/etc/init.d/nginx reload',
$service_ensure = 'running',
$service_name = 'nginx',
$service_flags = undef,
$service_manage = true,
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
recurse: true
)
end
it { is_expected.to contain_file('/var/nginx/client_body_temp').with(owner: 'nginx') }
it { is_expected.to contain_file('/var/nginx/proxy_temp').with(owner: 'nginx') }
it { is_expected.to contain_file('/etc/nginx/nginx.conf').with_content %r{^user nginx;} }
it { is_expected.to contain_file('/var/nginx/client_body_temp').with(owner: 'www-data') }
it { is_expected.to contain_file('/var/nginx/proxy_temp').with(owner: 'www-data') }
it { is_expected.to contain_file('/etc/nginx/nginx.conf').with_content %r{^user www-data;} }

it do
is_expected.to contain_file('/var/log/nginx').with(
Expand Down
6 changes: 6 additions & 0 deletions spec/default_module_facts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
osfamily: "Debian"
operatingsystem: "Debian"
operatingsystemmajrelease: "8"
lsbdistid: "Debian"
lsbdistcodename: "jessie"
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
puppetversion: Puppet.version,
facterversion: Facter.version
}
default_facts += YAML.read_file('default_facts.yml') if File.exist?('default_facts.yml')
default_facts += YAML.read_file('default_facts.yml') if File.exist?('default_module_facts.yml')
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__))
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__))
c.default_facts = default_facts
end

Expand Down

0 comments on commit 3408602

Please sign in to comment.