mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Rename product_base to product_common for consistency.
This commit is contained in:
32
roles/product_common/molecule/default/tests/test_default.py
Normal file
32
roles/product_common/molecule/default/tests/test_default.py
Normal file
@@ -0,0 +1,32 @@
|
||||
import os
|
||||
import pytest
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_user_created(host):
|
||||
user = host.user('testuser')
|
||||
assert user.exists
|
||||
|
||||
|
||||
@pytest.mark.parametrize('target', [
|
||||
'/opt/atlassian/product',
|
||||
'/opt/atlassian/temp'
|
||||
])
|
||||
def test_dirs_created(host, target):
|
||||
d = host.file(target)
|
||||
assert d.exists
|
||||
assert d.is_directory
|
||||
assert d.user == 'testuser'
|
||||
|
||||
|
||||
@pytest.mark.parametrize('exe', [
|
||||
'/usr/bin/git',
|
||||
'/usr/bin/psql',
|
||||
'/usr/bin/javac'
|
||||
])
|
||||
def test_package_exes(host, exe):
|
||||
assert host.file(exe).exists
|
||||
Reference in New Issue
Block a user