File: 0015-Fix-testsuite-errors.patch

package info (click to toggle)
crmsh 5.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,980 kB
  • sloc: python: 50,399; sh: 1,207; makefile: 255; xml: 243; exp: 234; awk: 22
file content (22 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Fix testsuite
 Make sure testsuite output works with Pacemaker 2.
Author: Valentin Vidic <vvidic@debian.org>
Last-Update: 2025-06-17
--- a/test/unittests/test_utils.py
+++ b/test/unittests/test_utils.py
@@ -18,12 +18,12 @@
 logging.basicConfig(level=logging.DEBUG)
 
 
-@mock.patch("crmsh.sh.ShellUtils.get_stdout")
+@mock.patch("crmsh.sh.ShellUtils.get_stdout_stderr")
 def test_package_is_installed_local(mock_run):
-    mock_run.return_value = (0, None)
+    mock_run.return_value = (0, None, None)
     res = utils.package_is_installed("crmsh")
     assert res is True
-    mock_run.assert_called_once_with("rpm -q --quiet crmsh")
+    mock_run.assert_called_once_with("dpkg-query --status crmsh")
 
 
 @mock.patch('re.search')