forked from ungleich-public/cdist
test help function
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
5d018393a9
commit
3265755bb9
1 changed files with 6 additions and 0 deletions
6
test.py
6
test.py
|
@ -34,6 +34,8 @@ sys.path.insert(0, os.path.abspath(
|
||||||
cdist_exec_path = os.path.abspath(
|
cdist_exec_path = os.path.abspath(
|
||||||
os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin/cdist"))
|
os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin/cdist"))
|
||||||
|
|
||||||
|
cdist_commands=["banner", "config", "install"]
|
||||||
|
|
||||||
import cdist
|
import cdist
|
||||||
import cdist.config
|
import cdist.config
|
||||||
import cdist.exec
|
import cdist.exec
|
||||||
|
@ -155,6 +157,10 @@ class UI(unittest.TestCase):
|
||||||
def test_banner(self):
|
def test_banner(self):
|
||||||
self.assertEqual(subprocess.call([cdist_exec_path, "banner"]), 0)
|
self.assertEqual(subprocess.call([cdist_exec_path, "banner"]), 0)
|
||||||
|
|
||||||
|
def test_help(self):
|
||||||
|
for cmd in cdist_commands:
|
||||||
|
self.assertEqual(subprocess.call([cdist_exec_path, cmd, "-h"]), 0)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in a new issue