tests: port tests/functional/test_install.py to use testinfra fixtures

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
pull/1150/head
Andrew Schoen 2016-12-03 08:10:54 -06:00
parent c02ffdb0e0
commit b5552239e7
1 changed files with 13 additions and 6 deletions

View 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_conf_exists(self):
assert os.path.isfile('/etc/ceph/ceph.conf')
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_command_exists(self, Command):
assert Command.exists("ceph")