mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 01:08:48 -03:30
Fix rsyslog permission error in github ubuntu tests from apparmor (#15717)
* Add test to detect rsyslog config problems * Get dmesg output * Disable apparmor for rsyslogd
This commit is contained in:
8
.github/actions/run_awx_devel/action.yml
vendored
8
.github/actions/run_awx_devel/action.yml
vendored
@@ -16,6 +16,14 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
- name: Disable apparmor for rsyslogd, first step
|
||||||
|
shell: bash
|
||||||
|
run: sudo ln -s /etc/apparmor.d/usr.sbin.rsyslogd /etc/apparmor.d/disable/
|
||||||
|
|
||||||
|
- name: Disable apparmor for rsyslogd, second step
|
||||||
|
shell: bash
|
||||||
|
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.rsyslogd
|
||||||
|
|
||||||
- name: Build awx_devel image for running checks
|
- name: Build awx_devel image for running checks
|
||||||
uses: ./.github/actions/awx_devel_image
|
uses: ./.github/actions/awx_devel_image
|
||||||
with:
|
with:
|
||||||
|
|||||||
10
awx/main/tests/live/tests/test_devel_image.py
Normal file
10
awx/main/tests/live/tests/test_devel_image.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
RSYSLOG_CONFIG = '/var/lib/awx/rsyslog/rsyslog.conf'
|
||||||
|
|
||||||
|
|
||||||
|
def test_rsyslog_config_readable():
|
||||||
|
with open(RSYSLOG_CONFIG, 'r') as f:
|
||||||
|
content = f.read()
|
||||||
|
assert '/var/lib/awx/rsyslog' in content
|
||||||
|
assert oct(os.stat(RSYSLOG_CONFIG).st_mode) == '0o100640'
|
||||||
Reference in New Issue
Block a user