Best practice for unit tests that rely on internet access?

David Cantrell david at cantrell.org.uk
Wed May 4 14:09:20 BST 2011


On Wed, May 04, 2011 at 01:07:52PM +0100, Paul Makepeace wrote:
> On Wed, May 4, 2011 at 12:24, David Cantrell <david at cantrell.org.uk> wrote:
> > I would consider the impact of trying to grab penthouse's robots.txt,
> > especially when it would only be accessed when testing a perl module, to
> > be so minimal as to be of no consequence.  But feel free to grab
> > http://cpxxxan.barnyard.co.uk/ instead if you'd prefer to hit a "willing
> > victim"'s site.
> How about the list of CPAN mirrors that the user has configured? I
> don't know much about CPAN's internals but it doesn't seem a stretch
> that that would be available or easily available through its API.
> Even failing that, www.cpan.org seems wholly reasonable.
> If you want a site that categorically will not notice, google.com and
> kernel.org ...

But all of those are likely to be whitelisted, unlike whatever random
webservice you're trying to test.

-- 
David Cantrell | Official London Perl Mongers Bad Influence

You can't spell AWESOME without ME!


More information about the london.pm mailing list