[cooks] Add ntp cookbook. [test] Add test for ntp cookbook.

This commit is contained in:
Andrey Danin 2012-08-10 14:09:30 +04:00
parent cf154c4a8a
commit ccf2a84a40
4 changed files with 21 additions and 1 deletions

2
cooks

@ -1 +1 @@
Subproject commit 50e3fd642c97618421a5568d5658a29e21255e81
Subproject commit 9f734d65ab6b0a0471b9cc32696e50bbd5785d76

View File

@ -28,3 +28,4 @@ ruby-json
yum
yum-utils
createrepo
ntpd

View File

@ -21,3 +21,4 @@ openstack-glance
wget
crontabs
cronie
ntp

View 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