Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHEF
cookbooks
sys
Commits
9caef0ac
Commit
9caef0ac
authored
Feb 03, 2022
by
Christopher Huhn
Browse files
Check proper setup of chef-client.timer and chef-client.service
parent
be0a1c49
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/integration/sys_chef/serverspec/localhost/chef_spec.rb
View file @
9caef0ac
...
...
@@ -2,7 +2,7 @@
# Cookbook Name:: sys
# Serverspec integration tests for sys::chef
#
# Copyright 2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
# Copyright 2020
-2022
GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
#
# Authors:
# Christopher Huhn <C.Huhn@gsi.de>
...
...
@@ -39,7 +39,20 @@ context 'chef-client config' do
end
end
describe
service
'chef-client.timer'
do
it
{
should
be_running
}
it
{
should
be_enabled
}
context
'not on Stretch'
,
if:
os
[
:release
].
to_i
>=
10
||
os
[
:family
]
!=
'debian'
do
# this check fails on Stretch:
describe
service
'chef-client.timer'
do
it
{
should
be_running
}
it
{
should
be_enabled
}
end
end
describe
service
'chef-client.service'
do
it
{
should_not
be_running
}
# oneshot servive
it
{
should_not
be_enabled
}
# triggered by timer
end
describe
command
'systemctl status chef-client.service'
do
# chef should not be running in daemon mode:
its
(
:stdout
)
{
should_not
match
%r{/usr/bin/chef-client
\s
(.*
\s
)?-d
\s
}
}
end
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