From 097e6936cb75a2e2b7fe2e5cc645502e68097505 Mon Sep 17 00:00:00 2001 From: "Craig E. Despeaux" Date: Thu, 20 Feb 2014 11:53:57 -0500 Subject: [PATCH] Fix failing tests --- src/test/check_getdns_common.c | 2 +- src/test/check_getdns_context_set_context_update_callback.h | 2 +- src/test/check_getdns_context_set_upstream_recursive_servers.h | 2 +- src/test/check_getdns_service_sync.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/check_getdns_common.c b/src/test/check_getdns_common.c index 76825e23..07a12e11 100644 --- a/src/test/check_getdns_common.c +++ b/src/test/check_getdns_common.c @@ -195,7 +195,7 @@ void assert_nxdomain(struct extracted_response *ex_response) { uint32_t rcode; - ASSERT_RC(ex_response->status, GETDNS_RESPSTATUS_GOOD, "Unexpected value for \"status\""); + ASSERT_RC(ex_response->status, GETDNS_RESPSTATUS_NO_NAME, "Unexpected value for \"status\""); ASSERT_RC(getdns_dict_get_int(ex_response->header, "rcode", &rcode), GETDNS_RETURN_GOOD, "Failed to extract \"rcode\""); ck_assert_msg(rcode == 3, "Expected rcode == 0, got %d", rcode); } diff --git a/src/test/check_getdns_context_set_context_update_callback.h b/src/test/check_getdns_context_set_context_update_callback.h index 0114d416..17134af2 100644 --- a/src/test/check_getdns_context_set_context_update_callback.h +++ b/src/test/check_getdns_context_set_context_update_callback.h @@ -70,7 +70,7 @@ GETDNS_RETURN_GOOD, "Return code from getdns_context_set_timeout()"); ASSERT_RC(getdns_context_set_context_update_callback(context, NULL), - GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_context_set_context_update_callback()"); + GETDNS_RETURN_GOOD, "Return code from getdns_context_set_context_update_callback()"); CONTEXT_DESTROY; diff --git a/src/test/check_getdns_context_set_upstream_recursive_servers.h b/src/test/check_getdns_context_set_upstream_recursive_servers.h index 1930458c..e9b7e22a 100644 --- a/src/test/check_getdns_context_set_upstream_recursive_servers.h +++ b/src/test/check_getdns_context_set_upstream_recursive_servers.h @@ -65,7 +65,7 @@ CONTEXT_CREATE(TRUE); ASSERT_RC(getdns_context_set_upstream_recursive_servers(context, NULL), - GETDNS_RETURN_CONTEXT_UPDATE_FAIL, "Return code from getdns_context_set_upstream_recursive_servers()"); + GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_context_set_upstream_recursive_servers()"); CONTEXT_DESTROY; diff --git a/src/test/check_getdns_service_sync.h b/src/test/check_getdns_service_sync.h index 55adf7d1..40efbf38 100644 --- a/src/test/check_getdns_service_sync.h +++ b/src/test/check_getdns_service_sync.h @@ -45,7 +45,7 @@ struct getdns_dict *response = NULL; ASSERT_RC(getdns_service_sync(context, "google.com", NULL, &response), - GETDNS_RETURN_BAD_CONTEXT, "Return code from getdns_service_sync()"); + GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_service_sync()"); } END_TEST