mirror of https://github.com/getdnsapi/getdns.git
Merge pull request #91 from verisign/feature/fix_getdns_address_nxdomain_case
Corrected getdns_address_8 test which produces NXDOMAIN response
This commit is contained in:
commit
6c154c8333
|
@ -168,7 +168,6 @@
|
||||||
verify_getdns_address_7, &transaction_id, callbackfn),
|
verify_getdns_address_7, &transaction_id, callbackfn),
|
||||||
GETDNS_RETURN_GOOD, "Return code from getdns_address()");
|
GETDNS_RETURN_GOOD, "Return code from getdns_address()");
|
||||||
|
|
||||||
|
|
||||||
RUN_EVENT_LOOP;
|
RUN_EVENT_LOOP;
|
||||||
CONTEXT_DESTROY;
|
CONTEXT_DESTROY;
|
||||||
}
|
}
|
||||||
|
@ -178,16 +177,15 @@
|
||||||
{
|
{
|
||||||
assert_noerror(ex_response);
|
assert_noerror(ex_response);
|
||||||
assert_address_in_answer(ex_response, TRUE, TRUE);
|
assert_address_in_answer(ex_response, TRUE, TRUE);
|
||||||
//assert_nodata(ex_response);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST (getdns_address_8)
|
START_TEST (getdns_address_8)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* name = "hostnamedoesntexist" (name should not be resolved)
|
* name = "hostnamedoesntexist" (name should not be resolved)
|
||||||
* expect: NOERROR response
|
* expect: NXDOMAIN response
|
||||||
* status = GETDNS_RESPSTATUS_GOOD
|
* status = GETDNS_RESPSTATUS_GOOD
|
||||||
* rcode = 0
|
* rcode = 3 (NXDOMAIN)
|
||||||
*/
|
*/
|
||||||
void verify_getdns_address_8(struct extracted_response *ex_response);
|
void verify_getdns_address_8(struct extracted_response *ex_response);
|
||||||
struct getdns_context *context = NULL; \
|
struct getdns_context *context = NULL; \
|
||||||
|
@ -209,7 +207,8 @@
|
||||||
|
|
||||||
void verify_getdns_address_8(struct extracted_response *ex_response)
|
void verify_getdns_address_8(struct extracted_response *ex_response)
|
||||||
{
|
{
|
||||||
assert_noerror(ex_response);
|
assert_nxdomain(ex_response);
|
||||||
|
assert_nodata(ex_response);
|
||||||
assert_soa_in_authority(ex_response);
|
assert_soa_in_authority(ex_response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue