diff options
Diffstat (limited to 'test/ares-test-mock-ai.cc')
-rw-r--r-- | test/ares-test-mock-ai.cc | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/test/ares-test-mock-ai.cc b/test/ares-test-mock-ai.cc index afbec30..7e69110 100644 --- a/test/ares-test-mock-ai.cc +++ b/test/ares-test-mock-ai.cc @@ -1,3 +1,20 @@ +/* + * Copyright (C) The c-ares project + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in + * advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SPDX-License-Identifier: MIT + */ #include "ares-test-ai.h" #include "dns-proto.h" @@ -177,8 +194,7 @@ TEST_P(MockTCPChannelTestAI, ServFailResponse) { ares_getaddrinfo(channel_, "www.google.com.", NULL, &hints, AddrInfoCallback, &result); Process(); EXPECT_TRUE(result.done_); - // ARES_FLAG_NOCHECKRESP not set, so SERVFAIL consumed - EXPECT_EQ(ARES_ECONNREFUSED, result.status_); + EXPECT_EQ(ARES_ESERVFAIL, result.status_); } TEST_P(MockTCPChannelTestAI, NotImplResponse) { @@ -196,8 +212,7 @@ TEST_P(MockTCPChannelTestAI, NotImplResponse) { ares_getaddrinfo(channel_, "www.google.com.", NULL, &hints, AddrInfoCallback, &result); Process(); EXPECT_TRUE(result.done_); - // ARES_FLAG_NOCHECKRESP not set, so NOTIMP consumed - EXPECT_EQ(ARES_ECONNREFUSED, result.status_); + EXPECT_EQ(ARES_ENOTIMP, result.status_); } TEST_P(MockTCPChannelTestAI, RefusedResponse) { @@ -215,8 +230,7 @@ TEST_P(MockTCPChannelTestAI, RefusedResponse) { ares_getaddrinfo(channel_, "www.google.com.", NULL, &hints, AddrInfoCallback, &result); Process(); EXPECT_TRUE(result.done_); - // ARES_FLAG_NOCHECKRESP not set, so REFUSED consumed - EXPECT_EQ(ARES_ECONNREFUSED, result.status_); + EXPECT_EQ(ARES_EREFUSED, result.status_); } TEST_P(MockTCPChannelTestAI, YXDomainResponse) { |