]> git.ipfire.org Git - pakfire.git/commitdiff
tests: execute: Actually verify the set nice level
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Mar 2025 11:38:45 +0000 (11:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Mar 2025 11:38:45 +0000 (11:38 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/python/execute.py

index d8b0c0275f0377071eb8e81b652e635b55988a15..c2ce2e89d533a6f2ac14b92538f8b0fbb88c57bc 100755 (executable)
@@ -123,7 +123,14 @@ class ExecuteTests(tests.TestCase):
                        self.pakfire.execute(["/does-not-exist"], input=b"1234")
 
        def test_nice(self):
-               self.pakfire.execute(["/command", "print-nice"], nice=5)
+               """
+                       Check if the jail is able to set the nice level
+               """
+               output = self.pakfire.execute(["/command", "print-nice"],
+                       nice=5, return_output=True)
+
+               # Check that we have received 5
+               self.assertEqual(output, b"5\n")
 
        def test_nice_invalid_input(self):
                """