Copy molecule tests from next branch

Add more tests in follow-up PRs.

Fixes #6
This commit is contained in:
Oliver Davies 2020-02-19 00:25:31 +00:00
parent cfb136bda5
commit 2cf2b919e2
7 changed files with 94 additions and 0 deletions

View file

@ -0,0 +1,18 @@
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_drupal_site_directory_exists(host):
directory = host.file('/var/www/test/sites/default')
assert directory.exists
assert directory.is_directory
def test_drupal_settings_file_exists(host):
file = host.file('/var/www/test/sites/default/settings.test.php')
assert file.exists
assert file.is_file

Binary file not shown.