aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cleaner_tests
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2023-02-15 09:40:44 +0100
committerJake Hunsaker <jhunsake@redhat.com>2023-02-16 13:13:25 -0500
commitb29ab8e997a066efcd8c5508905c3b265f99a7d5 (patch)
tree70a8aaf2f3109ef82b189a0a54f4cfc7859ba41d /tests/cleaner_tests
parentf46b5812cd455c2361910fcf1eaddf7707b66068 (diff)
downloadsos-b29ab8e997a066efcd8c5508905c3b265f99a7d5.tar.gz
[tests] Add test for #3071
Add test for #3071 : Prevent obfuscating tmpDir Resolves: #3136 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Diffstat (limited to 'tests/cleaner_tests')
-rw-r--r--tests/cleaner_tests/basic_function_tests/report_with_mask.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/cleaner_tests/basic_function_tests/report_with_mask.py b/tests/cleaner_tests/basic_function_tests/report_with_mask.py
index 352f3867..ea961c8c 100644
--- a/tests/cleaner_tests/basic_function_tests/report_with_mask.py
+++ b/tests/cleaner_tests/basic_function_tests/report_with_mask.py
@@ -60,7 +60,14 @@ class ReportWithCleanedKeywords(StageOneReportTest):
:avocado: tags=stageone
"""
- sos_cmd = '--clean -o filesys,kernel --keywords=fstab,Linux'
+ sos_cmd = '--clean -o filesys,kernel --keywords=fstab,Linux,tmp'
+
+ # Will the 'tmp' be properly treated in path to working dir without raising an error?
+ # To make this test effective, we assume the test runs on a system / with Policy
+ # returning '/var/tmp' as temp.dir
+ def test_keyword_in_tempdir_path(self):
+ self.assertOutputContains('Your sosreport has been generated and saved in:')
+ self.assertTrue('tmp/' in self.archive)
# Ok, sort of cheesy here but this does actually test filename changes on
# a file common to all distros