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:
Jakub Jelen
2023-10-03 17:44:40 +02:00
committed by Sahana Prasad
parent bac71d1e9c
commit 1fcaac9a35
2 changed files with 16 additions and 0 deletions

View File

@@ -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);
}