Commit 6002e14c authored by Steve Wills's avatar Steve Wills

Fix version tests

parent f75985d8
......@@ -18,12 +18,12 @@ ok(@ans = $g->reply_handler("status.example.com", "IN", "TXT", "192.168.0.10"),
like($ans[1]->[0]->rdatastr, qr!q: 1,!, 'one query now');
ok(@ans = $g->reply_handler("version.example.com", "IN", "TXT", "192.168.0.10"), "version request, txt");
like($ans[1]->[0]->rdatastr, qr!v$GeoDNS::VERSION/!, 'got the version back');
like($ans[1]->[0]->rdatastr, qr!v$GeoDNS::VERSION!, 'got the version back');
ok(sleep 1, 'sleep a second');
ok(@ans = $g->reply_handler("version.example.com", "IN", "ANY", "192.168.0.10"), "version request, any");
like($ans[1]->[0]->rdatastr, qr!v$GeoDNS::VERSION/!, 'got the version back');
like($ans[1]->[0]->rdatastr, qr!v$GeoDNS::VERSION!, 'got the version back');
ok(@ans = $g->reply_handler("status.example.com", "IN", "ANY", "192.168.0.10"), "status request, any");
like($ans[1]->[0]->rdatastr, qr!q: 4,!, 'four queries now');
......@@ -38,6 +38,6 @@ ok(@ans = $g->reply_handler("_status.pgeodns", "IN", "TXT", "192.168.0.10"), "_s
my $x = join "\n", $ans[1]->[0]->char_str_list;
#warn "[", ref $x, "] $x";
ok(my $data = decode_json($x), "decode json");
like($data->{v}, qr!v$GeoDNS::VERSION/!, 'got the version back');
like($data->{v}, qr!v$GeoDNS::VERSION!, 'got the version back');
done_testing();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment