Skip to content

Commit

Permalink
add a logrotate::rule for $log_path
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Oct 14, 2013
1 parent 0fc5e6c commit ceacf8f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ fixtures:
"wget":
repo: "git://github.com/maestrodev/puppet-wget.git"
ref: "v1.2.2"
"logrotate":
repo: "git://github.com/rodjek/puppet-logrotate.git"
ref: "1.1.1"
symlinks:
"selenium": "#{source_dir}"
1 change: 1 addition & 0 deletions Modulefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ summary 'Manages Selenium Server 2 - Standalone and Grid'
description 'Manages Selenium Server 2 - Standalone and Grid'
dependency 'puppetlabs/stdlib', '>= 3.0.0'
dependency 'maestrodev/wget', '>= 1.2.2'
dependency 'rodjek/logrotate', '>= 1.1.1'
11 changes: 11 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,15 @@
require => File[$jar_path],
}

logrotate::rule { 'selenium':
path => $log_path,
rotate_every => 'weekly',
missingok => true,
rotate => 4,
compress => true,
delaycompress => true,
copytruncate => true,
minsize => '100k',
}

}
10 changes: 10 additions & 0 deletions spec/classes/selenium_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@
'timeout' => '90',
'execuser' => p[:user],
})
should contain_logrotate__rule('selenium').with({
:path => "#{p[:install_root]}/log",
:rotate_every => 'weekly',
:missingok => true,
:rotate => 4,
:compress => true,
:delaycompress => true,
:copytruncate => true,
:minsize => '100k',
})
end
end

Expand Down

0 comments on commit ceacf8f

Please sign in to comment.