mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
tests: Implement more negative auth tests
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Sahana Prasad <sahana@redhat.com>
This commit is contained in:
committed by
Sahana Prasad
parent
bac71d1e9c
commit
1fcaac9a35
@@ -52,6 +52,10 @@ void torture_auth_agent(void **state)
|
||||
rc = ssh_userauth_list(session, NULL);
|
||||
assert_true(rc & SSH_AUTH_METHOD_PUBLICKEY);
|
||||
|
||||
/* negative test case */
|
||||
rc = ssh_userauth_agent(NULL, NULL);
|
||||
assert_int_equal(rc, SSH_AUTH_ERROR);
|
||||
|
||||
rc = ssh_userauth_agent(session, NULL);
|
||||
assert_ssh_return_code(session, rc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user