Subject: | test fails on depending on system's /etc/resolve.conf [with patch] |
t/04resolv_conf.t calls ->new without arguments, so constructor loads resolve.conf of the system. Simple patch attached that makes test independent from the system. However, it's possible that correct thing to do is to flush timeout to defaults when parse_resolv_conf is called (when text has no timeouts settings) or may be not.
--
Best regards, Ruslan.
Subject: | Net-DNS-Lite-0.12-dont-read-system-resolv-conf-in-tests.patch |
diff -ur Net-DNS-Lite-0.12/t/04resolv_conf.t Net-DNS-Lite-0.12-my/t/04resolv_conf.t
--- Net-DNS-Lite-0.12/t/04resolv_conf.t 2012-06-21 07:32:16.000000000 +0400
+++ Net-DNS-Lite-0.12-my/t/04resolv_conf.t 2015-07-07 17:02:43.000000000 +0300
@@ -3,7 +3,8 @@
use Net::DNS::Lite;
use Test::More;
-my $r = Net::DNS::Lite->new();
+# avoid reading system /etc/resolv.conf file
+my $r = Net::DNS::Lite->new(server => [qw/8.8.8.8/]);
{
$r->parse_resolv_conf(<<EOF);