26 lines
675 B
Python
26 lines
675 B
Python
|
#-*-coding:utf-8*-*
|
||
|
from os import system
|
||
|
from os.path import isfile
|
||
|
from creole.client import CreoleClient
|
||
|
|
||
|
def test_service_code():
|
||
|
"""
|
||
|
test sur les codes retour de CreoleService
|
||
|
"""
|
||
|
assert system('CreoleService nginx stop') == 0
|
||
|
assert system('CreoleService nginx status') != 0
|
||
|
assert system('CreoleService nginx start') == 0
|
||
|
assert system('CreoleService nginx status') == 0
|
||
|
|
||
|
def test_bad_service():
|
||
|
"""
|
||
|
service inconnu
|
||
|
"""
|
||
|
assert system('CreoleService unknown start') != 0
|
||
|
|
||
|
#def test_no_networking_stop():
|
||
|
# """
|
||
|
# networking est censé être protégé :)
|
||
|
# """
|
||
|
# assert system('CreoleService networking stop') != 0
|