This repository has been archived on 2025-01-07. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-role-drupal-settings/molecule/default/tests/test_default.py
Oliver Davies 2cf2b919e2 Copy molecule tests from next branch
Add more tests in follow-up PRs.

Fixes #6
2020-02-19 02:48:24 +00:00

19 lines
503 B
Python

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