summaryrefslogtreecommitdiffstats
path: root/src/tests/sysdb-tests.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2012-11-21 16:52:33 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-03-04 23:40:25 +0100
commitab967283b710dfa05d11ee5b30c7ac916486ceec (patch)
tree636b0ded10d3a282cbd3c8ff88e9c94de60d26e3 /src/tests/sysdb-tests.c
parent8bcabb97d988d1602882a1f036aac2eaf5e09234 (diff)
downloadsssd-ab967283b710dfa05d11ee5b30c7ac916486ceec.tar.gz
sssd-ab967283b710dfa05d11ee5b30c7ac916486ceec.tar.xz
sssd-ab967283b710dfa05d11ee5b30c7ac916486ceec.zip
Use SSSD specific errors for offline auth
This prevents reportin false errors when internal functions return a generic EINVAL or EACCES that should just be treated as internal errors.
Diffstat (limited to 'src/tests/sysdb-tests.c')
-rw-r--r--src/tests/sysdb-tests.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index 081df6cf6..ada0ccc56 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -1845,8 +1845,10 @@ START_TEST (test_sysdb_cached_authentication_missing_password)
username = talloc_asprintf(tmp_ctx, "testuser%d", _i);
fail_unless(username != NULL, "talloc_asprintf failed.");
- cached_authentication_without_expiration(username, "abc", ENOENT);
- cached_authentication_with_expiration(username, "abc", ENOENT);
+ cached_authentication_without_expiration(username, "abc",
+ ERR_NO_CACHED_CREDS);
+ cached_authentication_with_expiration(username, "abc",
+ ERR_NO_CACHED_CREDS);
talloc_free(tmp_ctx);
@@ -1864,8 +1866,10 @@ START_TEST (test_sysdb_cached_authentication_wrong_password)
username = talloc_asprintf(tmp_ctx, "testuser%d", _i);
fail_unless(username != NULL, "talloc_asprintf failed.");
- cached_authentication_without_expiration(username, "abc", EINVAL);
- cached_authentication_with_expiration(username, "abc", EINVAL);
+ cached_authentication_without_expiration(username, "abc",
+ ERR_AUTH_FAILED);
+ cached_authentication_with_expiration(username, "abc",
+ ERR_AUTH_FAILED);
talloc_free(tmp_ctx);