DCD-224: Generalise and expand testing of product base role.

This commit is contained in:
Steve Smith
2019-04-09 16:18:47 +10:00
parent 1823f5891e
commit c639ad2bbb
7 changed files with 39 additions and 4 deletions

View File

@@ -6,8 +6,10 @@ driver:
lint:
name: yamllint
platforms:
- name: instance
image: centos:7
- name: amazon_linux2
image: amazonlinux:2
- name: ubuntu_lts
image: ubuntu:bionic
provisioner:
name: ansible
lint:

View File

@@ -6,4 +6,5 @@
atl_product_home: "/opt/atlassian/product"
atl_installer_temp: "/opt/atlassian/temp"
roles:
- role: linux_common
- role: product_base

View File

@@ -13,11 +13,19 @@ def test_user_created(host):
@pytest.mark.parametrize('target', [
'/opt/atlassian/product',
'/opt/atlassian/temp'
'/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('target', [
'/usr/bin/git',
'/usr/bin/psql',
'/usr/bin/javac'
])
def test_package_exes(host, exe):
assert host.file(exe).exists