Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
salt-formulas
mirror
Logrotate Formula
Commits
69677b0c
Unverified
Commit
69677b0c
authored
Jan 14, 2022
by
Imran Iqbal
Browse files
test(jobs): add `hourly` test
parent
2136711a
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/integration/default/controls/jobs.rb
View file @
69677b0c
...
@@ -69,3 +69,22 @@ describe file('/etc/logrotate.d/nginx') do
...
@@ -69,3 +69,22 @@ describe file('/etc/logrotate.d/nginx') do
its
(
'content'
)
{
should
include
'postrotate'
}
its
(
'content'
)
{
should
include
'postrotate'
}
its
(
'content'
)
{
should
include
' invoke-rc.d nginx rotate >/dev/null 2>&1'
}
its
(
'content'
)
{
should
include
' invoke-rc.d nginx rotate >/dev/null 2>&1'
}
end
end
describe
file
(
'/etc/logrotate.hourly.d/nginx_high_traf'
)
do
it
{
should
be_file
}
it
{
should
be_owned_by
'root'
}
it
{
should
be_grouped_into
'root'
}
its
(
'mode'
)
{
should
cmp
'0644'
}
its
(
'content'
)
{
should
include
'/var/log/nginx_high_traf/*.log'
}
its
(
'content'
)
{
should
include
'hourly'
}
its
(
'content'
)
{
should
include
'missingok'
}
its
(
'content'
)
{
should
include
'rotate 720'
}
its
(
'content'
)
{
should
include
'compress'
}
its
(
'content'
)
{
should
include
'notifempty'
}
its
(
'content'
)
{
should
include
'dateext'
}
its
(
'content'
)
{
should
include
'dateformat .%Y-%m-%d-%H00'
}
its
(
'content'
)
{
should
include
'olddir /var/log/nginx_high_traf/archive'
}
its
(
'content'
)
{
should
include
'sharedscripts'
}
its
(
'content'
)
{
should
include
'postrotate'
}
its
(
'content'
)
{
should
include
'kill -USR1 $(cat /var/run/nginx_high_traf.pid)'
}
end
Francesco Gionghi
@fgionghi
mentioned in commit
726d537f
·
Feb 28, 2022
mentioned in commit
726d537f
mentioned in commit 726d537f9ae05361b8a74e73076443c99af0e51b
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment