mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
auth:creds: Add test for cli_credentials_get_password_obtained()
Signed-off-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
c14366cce4
commit
7f0aff4682
@ -167,6 +167,7 @@ static void torture_creds_parse_string(void **state)
|
||||
TALLOC_CTX *mem_ctx = *state;
|
||||
struct cli_credentials *creds = NULL;
|
||||
enum credentials_obtained princ_obtained = CRED_UNINITIALISED;
|
||||
enum credentials_obtained pwd_obtained = CRED_UNINITIALISED;
|
||||
|
||||
creds = cli_credentials_init(mem_ctx);
|
||||
assert_non_null(creds);
|
||||
@ -221,7 +222,9 @@ static void torture_creds_parse_string(void **state)
|
||||
assert_int_equal(princ_obtained, CRED_SPECIFIED);
|
||||
|
||||
assert_string_equal(creds->password, "BROT");
|
||||
assert_int_equal(creds->password_obtained, CRED_SPECIFIED);
|
||||
pwd_obtained = cli_credentials_get_password_obtained(creds);
|
||||
assert_int_equal(pwd_obtained, CRED_SPECIFIED);
|
||||
|
||||
}
|
||||
|
||||
static void torture_creds_krb5_state(void **state)
|
||||
|
Loading…
x
Reference in New Issue
Block a user