From: Andrew Schoen Date: Sat, 3 Dec 2016 14:10:54 +0000 (-0600) Subject: tests: port tests/functional/test_install.py to use testinfra fixtures X-Git-Tag: v2.1.0~26^2~35 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b5552239e750721428cfaad7d729f674ac6edfd1;p=ceph-ansible.git tests: port tests/functional/test_install.py to use testinfra fixtures Signed-off-by: Andrew Schoen --- diff --git a/tests/functional/tests/test_install.py b/tests/functional/tests/test_install.py index 4acaf2496..47b1938c3 100644 --- a/tests/functional/tests/test_install.py +++ b/tests/functional/tests/test_install.py @@ -1,10 +1,17 @@ -import os - class TestInstall(object): - def test_ceph_dir_exists(self): - assert os.path.isdir('/etc/ceph') + def test_ceph_dir_exists(self, File): + assert File('/etc/ceph').exists + + def test_ceph_dir_is_a_directory(self, File): + assert File('/etc/ceph').is_directory + + def test_ceph_conf_exists(self, File): + assert File('/etc/ceph/ceph.conf').exists + + def test_ceph_conf_is_a_file(self, File): + assert File('/etc/ceph/ceph.conf').is_file - def test_ceph_conf_exists(self): - assert os.path.isfile('/etc/ceph/ceph.conf') + def test_ceph_command_exists(self, Command): + assert Command.exists("ceph")