# Tests to be run with testinfra tool import re def test_config_file(File): for d in "root offline_db logs checkpoints tmp".split(): dir = File('/p4/1/%s' % d) assert dir.is_directory def test_start_works(Command): command = Command('/p4/1/bin/p4d_1_init start') assert command.rc == 0 command = Command('/p4/1/bin/p4_1 -p 1666 info') assert re.search('ServerID', command.stdout) assert command.rc == 0