DCD-802: Fix test and implementation for setting shared home owner and

group to application user
This commit is contained in:
Ben Partridge
2019-11-18 16:37:26 +11:00
parent 41cd616a60
commit 4827ae8423
4 changed files with 101 additions and 34 deletions

View File

@@ -19,8 +19,12 @@ def test_postgresql_version(host):
pg_dump_version_output = host.check_output('pg_dump --version')
assert '(PostgreSQL) 9.6' in pg_dump_version_output
def test_shared_home_owner(host):
for root, dirs, files in os.walk('/media/atl/jira/shared'):
for fileName in files + dirs:
assert host.file(fileName).user == 'jira'
assert host.file(fileName).group == 'jira'
@pytest.mark.parametrize('file', [
'/media/atl/jira/shared',
'/media/atl/jira/shared/hello',
'/media/atl/jira/shared/hello/hello.txt'
])
def test_shared_home_owner(host, file):
assert host.file(file).exists
assert host.file(file).user == 'jira'
assert host.file(file).group == 'jira'