Copy molecule tests from next branch
Add more tests in follow-up PRs. Fixes #6
This commit is contained in:
parent
cfb136bda5
commit
2cf2b919e2
7 changed files with 94 additions and 0 deletions
18
molecule/default/tests/test_default.py
Normal file
18
molecule/default/tests/test_default.py
Normal 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
|
BIN
molecule/default/tests/test_default.pyc
Normal file
BIN
molecule/default/tests/test_default.pyc
Normal file
Binary file not shown.
Reference in a new issue