diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-04-11 15:00:01 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-04-11 15:00:01 +0100 |
commit | 6943c3c3a4dd1334aa041fcd7df9598ecec3f152 (patch) | |
tree | fa00017db0e4bf42d211c92088b72912c423fe7d /test/rspamd_dns_test.c | |
parent | 641353ecb1c68ef7642a15d861ff59aba672ac54 (diff) | |
download | rspamd-6943c3c3a4dd1334aa041fcd7df9598ecec3f152.tar.gz rspamd-6943c3c3a4dd1334aa041fcd7df9598ecec3f152.zip |
[Minor] Refactor DNS resolver invocations
Diffstat (limited to 'test/rspamd_dns_test.c')
-rw-r--r-- | test/rspamd_dns_test.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/rspamd_dns_test.c b/test/rspamd_dns_test.c index c2383b61a..678f34e4d 100644 --- a/test/rspamd_dns_test.c +++ b/test/rspamd_dns_test.c @@ -82,24 +82,25 @@ rspamd_dns_test_func () s = rspamd_session_create (pool, session_fin, NULL, NULL, NULL); - resolver = dns_resolver_init (NULL, base, cfg); + resolver = rspamd_dns_resolver_init (NULL, base, cfg); requests ++; - g_assert (make_dns_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_A, "google.com")); + g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_A, "google.com")); requests ++; - g_assert (make_dns_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_PTR, "81.19.70.3")); + g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_PTR, "81.19.70.3")); requests ++; - g_assert (make_dns_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_MX, "rambler.ru")); + g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_MX, "rambler.ru")); requests ++; - g_assert (make_dns_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_TXT, "rambler.ru")); + g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_TXT, "rambler.ru")); requests ++; - g_assert (make_dns_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_TXT, "google.com")); + g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_TXT, "google.com")); requests ++; - g_assert (make_dns_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_SPF, "rambler.ru")); + g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_SPF, "rambler.ru")); requests ++; - g_assert (make_dns_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_SRV, "_xmpp-server._tcp.jabber.org")); + g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_SRV, + "_xmpp-server._tcp.jabber.org")); requests ++; - g_assert (make_dns_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_TXT, "non-existent.arpa")); + g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_TXT, "non-existent.arpa")); g_assert (resolver != NULL); |