aboutsummaryrefslogtreecommitdiffstats
path: root/tests/report_tests
diff options
context:
space:
mode:
authorArif Ali <arif.ali@canonical.com>2024-03-15 11:06:34 +0000
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-04-09 20:01:21 -0400
commit46cd148ec13c7e79a93e3d9f6a5d0bd8a97e0ac3 (patch)
tree5a94d28de796e3f30f8b6811b32e9ad8ed271f8f /tests/report_tests
parentf109e7df0bf743b6c1d3134959a3b3dd56a8b80d (diff)
downloadsos-46cd148ec13c7e79a93e3d9f6a5d0bd8a97e0ac3.tar.gz
[cirrus] Run tests on latest daily builds for ubuntu
Fix the issues reported by the tests on the new version of ubuntu Resolves: #3587 Closes: #3588 Related: SET-594,SET-595 Co-authored-by: David Negreira <david.negreira@canonical.com> Signed-off-by: Arif Ali <arif.ali@canonical.com> Signed-off-by: David Negreira <david.negreira@canonical.com>
Diffstat (limited to 'tests/report_tests')
-rw-r--r--tests/report_tests/basic_report_tests.py6
-rw-r--r--tests/report_tests/encryption_tests.py5
-rw-r--r--tests/report_tests/exception_tests.py6
-rw-r--r--tests/report_tests/options_tests/options_tests.py4
4 files changed, 11 insertions, 10 deletions
diff --git a/tests/report_tests/basic_report_tests.py b/tests/report_tests/basic_report_tests.py
index a6fdf003..58618cbc 100644
--- a/tests/report_tests/basic_report_tests.py
+++ b/tests/report_tests/basic_report_tests.py
@@ -23,7 +23,7 @@ class NormalSoSReport(StageOneReportTest):
def test_debug_not_printed_to_console(self):
self.assertOutputNotContains('added cmd output')
- self.assertOutputNotContains('\[archive:.*\]')
+ self.assertOutputNotContains(r'\[archive:.*\]')
def test_postproc_called(self):
self.assertSosLogContains('substituting scrpath')
@@ -61,11 +61,11 @@ class LogLevelTest(StageOneReportTest):
sos_cmd = '-vvv -o kernel,host,boot,filesys'
def test_archive_logging_enabled(self):
- self.assertSosLogContains('DEBUG: \[archive:.*\]')
+ self.assertSosLogContains(r'DEBUG: \[archive:.*\]')
self.assertSosLogContains('Making leading paths for')
def test_debug_printed_to_console(self):
- self.assertOutputContains('\[plugin:.*\]')
+ self.assertOutputContains(r'\[plugin:.*\]')
class RestrictedSoSReport(StageOneReportTest):
diff --git a/tests/report_tests/encryption_tests.py b/tests/report_tests/encryption_tests.py
index 9ce401ec..d60d9d78 100644
--- a/tests/report_tests/encryption_tests.py
+++ b/tests/report_tests/encryption_tests.py
@@ -22,10 +22,11 @@ class EncryptedReportTest(StageOneReportTest):
sos_cmd = "-o kernel --encrypt-pass %s" % encrypt_pass
def test_archive_gpg_encrypted(self):
- self.assertOutputContains('/.*sosreport-.*tar.*\.gpg')
+ self.assertOutputContains(r'/.*sosreport-.*tar.*\.gpg')
_cmd = "file %s" % self.encrypted_path
res = process.run(_cmd)
- self.assertTrue("GPG symmetrically encrypted data" in res.stdout.decode())
+ self.assertTrue(("GPG symmetrically encrypted data" in res.stdout.decode())
+ or ("PGP symmetric key encrypted data" in res.stdout.decode()))
def test_tarball_named_secure(self):
self.assertTrue('secured-' in self.encrypted_path)
diff --git a/tests/report_tests/exception_tests.py b/tests/report_tests/exception_tests.py
index 769954a0..678c06d6 100644
--- a/tests/report_tests/exception_tests.py
+++ b/tests/report_tests/exception_tests.py
@@ -17,7 +17,7 @@ class InvalidPluginEnabledTest(StageOneReportExceptionTest):
sos_cmd = '-o foobar'
def test_caught_invalid_plugin(self):
- self.assertOutputContains('a non-existing plugin \(foobar\)')
+ self.assertOutputContains(r'a non-existing plugin \(foobar\)')
class InvalidPluginOptionTest(StageOneReportExceptionTest):
@@ -28,7 +28,7 @@ class InvalidPluginOptionTest(StageOneReportExceptionTest):
sos_cmd = '-o kernel -k kernel.colonel=on'
def test_caught_invalid_plugin_option(self):
- self.assertOutputContains('no such option "colonel" for plugin \(kernel\)')
+ self.assertOutputContains(r'no such option "colonel" for plugin \(kernel\)')
class InvalidReportOptionTest(StageOneReportExceptionTest):
@@ -39,7 +39,7 @@ class InvalidReportOptionTest(StageOneReportExceptionTest):
sos_cmd = '--magic'
def test_caught_invalid_option(self):
- self.assertOutputContains('unrecognized arguments\: --magic')
+ self.assertOutputContains(r'unrecognized arguments\: --magic')
class InvalidPluginDisableTest(StageOneReportTest):
diff --git a/tests/report_tests/options_tests/options_tests.py b/tests/report_tests/options_tests/options_tests.py
index 997042ba..e912da8d 100644
--- a/tests/report_tests/options_tests/options_tests.py
+++ b/tests/report_tests/options_tests/options_tests.py
@@ -27,10 +27,10 @@ class OptionsFromConfigTest(StageTwoReportTest):
def test_plugopts_logged_from_config(self):
self.assertSosLogContains(
- "Set kernel plugin option to \(name=with-timer, desc='gather /proc/timer\* statistics', value=True, default=False\)"
+ r"Set kernel plugin option to \(name=with-timer, desc='gather /proc/timer\* statistics', value=True, default=False\)"
)
self.assertSosLogContains(
- "Set kernel plugin option to \(name=trace, desc='gather /sys/kernel/debug/tracing/trace file', value=True, default=False\)"
+ r"Set kernel plugin option to \(name=trace, desc='gather /sys/kernel/debug/tracing/trace file', value=True, default=False\)"
)
def test_disabled_plugopts_not_loaded(self):