URL: https://github.com/freeipa/freeipa/pull/1924
Author: celestian
 Title: #1924: tests: Fix on test_sudo_rule_restricted_to_one_hostmask_negative
Action: opened

PR body:
"""
The error message was changed. This patch fix the test
to current situation.

https://pagure.io/freeipa/issue/7543
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1924/head:pr1924
git checkout pr1924
From 47d5eb1cd20735130777e667d2350eb97fbc5cad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C4=8Cech?= <pc...@redhat.com>
Date: Mon, 14 May 2018 10:14:45 +0200
Subject: [PATCH] tests: Fix on
 test_sudo_rule_restricted_to_one_hostmask_negative

The error message was changed. This patch fix the test
to current situation.

https://pagure.io/freeipa/issue/7543
---
 ipatests/test_integration/test_sudo.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ipatests/test_integration/test_sudo.py b/ipatests/test_integration/test_sudo.py
index aa4f11c76c..d08431d030 100644
--- a/ipatests/test_integration/test_sudo.py
+++ b/ipatests/test_integration/test_sudo.py
@@ -358,8 +358,7 @@ def test_sudo_rule_restricted_to_one_hostmask_negative_setup(self):
     def test_sudo_rule_restricted_to_one_hostmask_negative(self):
         result1 = self.list_sudo_commands("testuser1")
         assert result1.returncode != 0
-        assert "Sorry, user testuser1 may not run sudo on {}.".format(
-            self.clientname) in result1.stderr_text
+        assert "sudo: a password is required" in result1.stderr_text
 
     def test_sudo_rule_restricted_to_one_hostmask_negative_teardown(self):
         # Remove the master's hostmask from the rule
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to