diff --git a/tests/functional_tests/lib/src/helpers.c b/tests/functional_tests/lib/src/helpers.c index ad7ae5ba..5a1bcc60 100644 --- a/tests/functional_tests/lib/src/helpers.c +++ b/tests/functional_tests/lib/src/helpers.c @@ -40,38 +40,7 @@ int functional_tests_pkam_auth(atclient *atclient, atclient_atkeys *atkeys, cons atlogger_log(TAG, ATLOGGER_LOGGING_LEVEL_INFO, "functional_tests_pkam_auth Begin\n"); - if(atclient == NULL) { - ret = 1; - atlogger_log(TAG, ATLOGGER_LOGGING_LEVEL_ERROR, "atclient is NULL\n"); - return ret; - } - - if(atkeys == NULL) { - ret = 1; - atlogger_log(TAG, ATLOGGER_LOGGING_LEVEL_ERROR, "atkeys is NULL\n"); - return ret; - } - - if(atsign == NULL) { - ret = 1; - atlogger_log(TAG, ATLOGGER_LOGGING_LEVEL_ERROR, "atsign is NULL\n"); - return ret; - } - - atclient_authenticate_options authenticate_options; - atclient_authenticate_options_init(&authenticate_options); - - if((ret = atclient_authenticate_options_set_atdirectory_host(&authenticate_options, ATDIRECTORY_HOST)) != 0) { - atlogger_log(TAG, ATLOGGER_LOGGING_LEVEL_ERROR, "atclient_authenticate_options_set_atdirectory_host: %d\n", ret); - goto exit; - } - - if((ret = atclient_authenticate_options_set_atdirectory_port(&authenticate_options, ATDIRECTORY_PORT)) != 0) { - atlogger_log(TAG, ATLOGGER_LOGGING_LEVEL_ERROR, "atclient_authenticate_options_set_atdirectory_port: %d\n", ret); - goto exit; - } - - if ((ret = atclient_pkam_authenticate(atclient, atsign, atkeys, &authenticate_options)) != 0) { + if ((ret = atclient_pkam_authenticate(atclient, atsign, atkeys, NULL, NULL)) != 0) { atlogger_log(TAG, ATLOGGER_LOGGING_LEVEL_ERROR, "atclient_pkam_authenticate: %d\n", ret); goto exit; } diff --git a/tests/functional_tests/tests/test_atclient_pkam_authenticate.c b/tests/functional_tests/tests/test_atclient_pkam_authenticate.c index fe0592db..a7bfa4d9 100644 --- a/tests/functional_tests/tests/test_atclient_pkam_authenticate.c +++ b/tests/functional_tests/tests/test_atclient_pkam_authenticate.c @@ -76,7 +76,7 @@ static int test1_pkam_no_options() { } atlogger_log(tag, ATLOGGER_LOGGING_LEVEL_INFO, "atclient_atkeys_populate_from_atkeys_file: %d\n", ret); - if ((ret = atclient_pkam_authenticate(&atclient, atsign, &atkeys, &authenticate_options)) != 0) { + if ((ret = atclient_pkam_authenticate(&atclient, atsign, &atkeys, NULL, NULL)) != 0) { atlogger_log(tag, ATLOGGER_LOGGING_LEVEL_ERROR, "Failed to authenticate\n"); return ret; } else { @@ -123,15 +123,7 @@ static int test2_pkam_with_options() { return ret; } - if ((ret = atclient_authenticate_options_set_atserver_host(&options, atserver_host)) != 0) { - return ret; - } - - if ((ret = atclient_authenticate_options_set_atserver_port(&options, atserver_port)) != 0) { - return ret; - } - - if ((ret = atclient_pkam_authenticate(&atclient, atsign, &atkeys, &options)) != 0) { + if ((ret = atclient_pkam_authenticate(&atclient, atsign, &atkeys, NULL, NULL)) != 0) { atlogger_log(tag, ATLOGGER_LOGGING_LEVEL_ERROR, "Failed to authenticate\n"); return ret; } else {