mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-802: Add test and logic for setting version file owner to root in
shared home
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
vars:
|
||||
atl_backup_manifest_url: 's3://dcd-slingshot-test/dummy_manifest.json'
|
||||
atl_product_user: 'jira'
|
||||
atl_product_edition: 'jira-software'
|
||||
atl_product_version_cache: "{{ atl_product_home_shared }}/{{ atl_product_edition }}.version"
|
||||
atl_product_user_uid: '2001'
|
||||
atl_backup_home_restore_canary_path: '/tmp/canary.tmp'
|
||||
atl_product_home_shared: '/media/atl/jira/shared'
|
||||
@@ -12,6 +14,7 @@
|
||||
|
||||
test_archive_source: '/tmp/hello'
|
||||
test_archive_file: 'hello.txt'
|
||||
test_product_version_file: "/tmp/{{ atl_product_edition }}.version"
|
||||
test_archive: '/tmp/hello.tar.gz'
|
||||
test_pre_step_prefix: '[PRE-TEST]'
|
||||
|
||||
@@ -47,9 +50,16 @@
|
||||
create: yes
|
||||
line: 'Hello, world!'
|
||||
path: "{{ test_archive_source }}/{{ test_archive_file }}"
|
||||
- name: "{{ test_pre_step_prefix }} Create the version file in the shared home"
|
||||
lineinfile:
|
||||
create: yes
|
||||
line: '8.5'
|
||||
path: "{{ test_product_version_file }}"
|
||||
- name: "{{ test_pre_step_prefix }} Archive the shared home"
|
||||
archive:
|
||||
path: "{{ test_archive_source }}"
|
||||
path:
|
||||
- "{{ test_archive_source }}"
|
||||
- "{{ test_product_version_file }}"
|
||||
dest: "{{ test_archive }}"
|
||||
owner: "{{ atl_product_user }}"
|
||||
|
||||
|
||||
@@ -27,4 +27,9 @@ def test_postgresql_version(host):
|
||||
def test_shared_home_owner(host, file):
|
||||
assert host.file(file).exists
|
||||
assert host.file(file).user == 'jira'
|
||||
assert host.file(file).group == 'jira'
|
||||
assert host.file(file).group == 'jira'
|
||||
|
||||
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'
|
||||
assert host.file('/media/atl/jira/shared/jira-software.version').group == 'root'
|
||||
Reference in New Issue
Block a user