aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-03-20 12:22:30 +0100
committerAndreas Schneider <asn@samba.org>2020-03-20 13:10:16 +0100
commit3fdd6ad7fe83be27064a000bc6061b937cb39baa (patch)
tree3da3c7ae211ba13d82e12e7c93ab555c2ebe9ddf
parent70f44f4b1f46ae51e63dc7607a67e74f35f7d756 (diff)
downloadpam_wrapper-3fdd6ad7fe83be27064a000bc6061b937cb39baa.tar.gz
pam_wrapper-3fdd6ad7fe83be27064a000bc6061b937cb39baa.tar.xz
pam_wrapper-3fdd6ad7fe83be27064a000bc6061b937cb39baa.zip
tests: Fix pypamtest_test.py on BSD
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
-rwxr-xr-xtests/pypamtest_test.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/pypamtest_test.py b/tests/pypamtest_test.py
index c4534bb..8461735 100755
--- a/tests/pypamtest_test.py
+++ b/tests/pypamtest_test.py
@@ -4,6 +4,7 @@ import unittest
import os
import sys
import os.path
+import platform
class PyPamTestCase(unittest.TestCase):
def assertPamTestResultEqual(self, test_result, err_list, info_list):
@@ -117,7 +118,12 @@ class PyPamTestRunTest(unittest.TestCase):
def test_run_failed_auth(self):
neo_password = "not-the-secret"
- tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rv=7) # PAM_AUTH_ERR
+ rv = 7 # PAM_AUTH_ERR
+
+ # On SRV4 the PAM_AUTH_ERR is 9
+ if ("BSD" in platform.system()):
+ rv = 9
+ tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rv=rv)
res = pypamtest.run_pamtest("neo", "matrix_py", [tc], [ neo_password ])
def test_run_chatty_auth(self):