[cooks] Add ntp cookbook. [test] Add test for ntp cookbook.
This commit is contained in:
parent
cf154c4a8a
commit
ccf2a84a40
2
cooks
2
cooks
@ -1 +1 @@
|
||||
Subproject commit 50e3fd642c97618421a5568d5658a29e21255e81
|
||||
Subproject commit 9f734d65ab6b0a0471b9cc32696e50bbd5785d76
|
@ -28,3 +28,4 @@ ruby-json
|
||||
yum
|
||||
yum-utils
|
||||
createrepo
|
||||
ntpd
|
||||
|
@ -21,3 +21,4 @@ openstack-glance
|
||||
wget
|
||||
crontabs
|
||||
cronie
|
||||
ntp
|
||||
|
18
test/cookbooks/test_ntp.py
Normal file
18
test/cookbooks/test_ntp.py
Normal file
@ -0,0 +1,18 @@
|
||||
from . import CookbookTestCase
|
||||
from devops.helpers import tcp_ping
|
||||
|
||||
class TestNTP(CookbookTestCase):
|
||||
cookbooks = ['ntp']
|
||||
|
||||
@classmethod
|
||||
def setUpState(klass):
|
||||
klass.chef_solo({
|
||||
'recipes': ['ntp']
|
||||
})
|
||||
|
||||
def test_is_ntp_running(self):
|
||||
cmd = 'ps aux|grep \'[ /]ntp\''
|
||||
error_msg = 'There is no NTP process in memory.'
|
||||
run_result = self.remote.execute(cmd)
|
||||
assert run_result['exit_code'] == 0, error_msg
|
||||
|
Loading…
Reference in New Issue
Block a user