Skip to content

Commit

Permalink
Linting, fix provider typo, add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jlyheden committed Feb 19, 2016
1 parent 1cda445 commit af5c76b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{
PuppetLint.configuration.send("disable_80chars")
PuppetLint.configuration.send("disable_autoloader_layout")
PuppetLint.configuration.send("disable_quoted_booleans")
PuppetLint.configuration.send("disable_documentation")
PuppetLint.configuration.send("disable_class_inherits_from_params_class")
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

Expand Down
8 changes: 4 additions & 4 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
default => "${virtualenv}/bin/devpi-server"
}
file { "/usr/lib/systemd/system/${::devpi::service_name}.service":
ensure => $::devpi::ensure,
owner => 'root',
group => 'root',
mode => '0644',
ensure => $::devpi::ensure,
owner => 'root',
group => 'root',
mode => '0644',
content => template("${module_name}/systemd.service.erb")
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
service { $::devpi::service_name:
ensure => $::devpi::service_ensure,
enable => $::devpi::service_enable,
provider => $provder
provider => $provider
}

}
11 changes: 10 additions & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
require 'spec_helper'

provider = {
6 => 'upstart',
7 => 'systemd'
}

describe 'devpi' do

[6,7].each do |osmaj|
Expand All @@ -14,7 +20,10 @@
it { should compile.with_all_deps }
it { should_not contain_package('devpi-client') }
it { should contain_package('devpi-server') }
it { should contain_service('devpi-server') }
it { should contain_service('devpi-server').with(
:provider => provider[osmaj]
)
}
it { should contain_user('devpi') }
it { should contain_file('/opt/devpi') }
if osmaj == 6 then
Expand Down

0 comments on commit af5c76b

Please sign in to comment.