]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: port tests/functional/test_install.py to use testinfra fixtures
authorAndrew Schoen <aschoen@redhat.com>
Sat, 3 Dec 2016 14:10:54 +0000 (08:10 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 6 Dec 2016 20:56:18 +0000 (14:56 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
tests/functional/tests/test_install.py

index 4acaf24963771c463b49ec2ad6fbb36d8d1b5803..47b1938c3a9fff572995f5e16f08c3b4f995fad9 100644 (file)
@@ -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")