mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-10 06:23:01 +03:00
tests: Reformat unittests/torture_pki_rsa_uri
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -259,18 +259,18 @@ static void torture_pki_rsa_uri_invalid_configurations(void **state)
|
|||||||
assert_null(pubkey);
|
assert_null(pubkey);
|
||||||
|
|
||||||
rc = ssh_pki_import_privkey_file(test_state->priv_uri_invalid_object,
|
rc = ssh_pki_import_privkey_file(test_state->priv_uri_invalid_object,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&privkey);
|
&privkey);
|
||||||
assert_int_not_equal(rc, 0);
|
assert_int_not_equal(rc, 0);
|
||||||
assert_null(privkey);
|
assert_null(privkey);
|
||||||
|
|
||||||
rc = ssh_pki_import_privkey_file(test_state->priv_uri_invalid_token,
|
rc = ssh_pki_import_privkey_file(test_state->priv_uri_invalid_token,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&privkey);
|
&privkey);
|
||||||
assert_int_not_equal(rc, 0);
|
assert_int_not_equal(rc, 0);
|
||||||
assert_null(privkey);
|
assert_null(privkey);
|
||||||
|
|
||||||
@@ -278,7 +278,9 @@ static void torture_pki_rsa_uri_invalid_configurations(void **state)
|
|||||||
SSH_KEY_FREE(privkey);
|
SSH_KEY_FREE(privkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
int torture_run_tests(void) {
|
int
|
||||||
|
torture_run_tests(void)
|
||||||
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct CMUnitTest tests[] = {
|
struct CMUnitTest tests[] = {
|
||||||
cmocka_unit_test(torture_pki_rsa_import_pubkey_uri),
|
cmocka_unit_test(torture_pki_rsa_import_pubkey_uri),
|
||||||
@@ -290,11 +292,14 @@ int torture_run_tests(void) {
|
|||||||
|
|
||||||
ssh_session session = ssh_new();
|
ssh_session session = ssh_new();
|
||||||
int verbosity = SSH_LOG_FUNCTIONS;
|
int verbosity = SSH_LOG_FUNCTIONS;
|
||||||
ssh_options_set(session,SSH_OPTIONS_LOG_VERBOSITY,&verbosity);
|
|
||||||
|
ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
|
||||||
ssh_init();
|
ssh_init();
|
||||||
|
|
||||||
torture_filter_tests(tests);
|
torture_filter_tests(tests);
|
||||||
rc = cmocka_run_group_tests(tests, setup_directory_structure, teardown_directory_structure);
|
rc = cmocka_run_group_tests(tests,
|
||||||
|
setup_directory_structure,
|
||||||
|
teardown_directory_structure);
|
||||||
|
|
||||||
ssh_finalize();
|
ssh_finalize();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user