Test::Instance::DNS - Mock DNS server for testing
use Test::More; use Test::DNS; use Test::Instance::DNS; my $t_i_dns = Test::Instance::DNS->new( listen_addr => '127.0.0.1', zone_file => 't/etc/db.example.com', ); $t_i_dns->run; my $dns = Test::DNS->new(nameservers => ['127.0.0.1']); $dns->object->port($t_i_dns->listen_port); $dns->is_a('example.com' => '192.0.2.1'); done_testing;
Provides a local mock DNS server usable for testing.
Tom Bloor <t.bloor@shadowcat.co.uk>
Copyright 2018- Tom Bloor
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Test::DNS Net::DNS
To install Test::Instance::DNS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Instance::DNS
CPAN shell
perl -MCPAN -e shell install Test::Instance::DNS
For more information on module installation, please visit the detailed CPAN module installation guide.