mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-16 01:43:06 -06:00
DCD-802: Fix file mode preservation in restore and add test for file
mode
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import pytest
|
||||
from stat import *
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
@@ -29,6 +30,10 @@ def test_shared_home_owner(host, file):
|
||||
assert host.file(file).user == 'jira'
|
||||
assert host.file(file).group == 'jira'
|
||||
|
||||
def test_file_modes(host):
|
||||
assert host.file('/media/atl/jira/shared/hello').mode == 0o755
|
||||
assert host.file('/media/atl/jira/shared/hello/hello.txt').mode == 0o640
|
||||
|
||||
def test_version_file_owned_by_root(host):
|
||||
assert host.file('/media/atl/jira/shared/jira-software.version').exists
|
||||
assert host.file('/media/atl/jira/shared/jira-software.version').user == 'root'
|
||||
|
||||
Reference in New Issue
Block a user