diff options
author | Chad Smith <chad.smith@canonical.com> | 2023-03-05 21:13:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 21:13:54 -0700 |
commit | 20335153b45e61de200b7eaf08941d9e3ea37cf4 (patch) | |
tree | 2cf6d7f2c453a8c9d8afc0276882fd47491e35b4 | |
parent | 6b9bf7b9bb2db20b7d254f0143df343e14f4c7d4 (diff) | |
download | cloud-init-git-20335153b45e61de200b7eaf08941d9e3ea37cf4.tar.gz |
tests: Write to /var/spool/rsyslog to adhere to apparmor profile (#2059)
AppArmor is active on 23.04. It prevents writing to /var/tmp.
Integration test now writes to /var/spool/rsyslog/cloudinit.log to
assert working config.
-rw-r--r-- | tests/integration_tests/modules/test_combined.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration_tests/modules/test_combined.py b/tests/integration_tests/modules/test_combined.py index 264e2383..8481b454 100644 --- a/tests/integration_tests/modules/test_combined.py +++ b/tests/integration_tests/modules/test_combined.py @@ -60,7 +60,7 @@ rsyslog: content: | module(load="imtcp") input(type="imtcp" port="514") - $template RemoteLogs,"/var/tmp/rsyslog.log" + $template RemoteLogs,"/var/spool/rsyslog/cloudinit.log" *.* ?RemoteLogs & ~ remotes: @@ -175,7 +175,9 @@ class TestCombined: def test_rsyslog(self, class_client: IntegrationInstance): """Test rsyslog is configured correctly.""" client = class_client - assert "My test log" in client.read_from_file("/var/tmp/rsyslog.log") + assert "My test log" in client.read_from_file( + "/var/spool/rsyslog/cloudinit.log" + ) def test_runcmd(self, class_client: IntegrationInstance): """Test runcmd works as expected""" |