in reply to Flickr OAuth module and testing

Anyone has a better solution?

There are a few options :) 1) launch a local oath server against which to authenticate

2) mock the server calls (fake them)

3) skip tests unless the user specifies (thus gives permission) the following vars/args: $ENV{PERL_YOURDISTNAME_OAUTH_USER} and $ENV{PERL_YOURDISTNAME_OAUTH_PASSWORD} (or equivalent perl Makefile.PL PERL_YOURDISTNAME_OAUTH_PASSWORD=...

4) prompt of ExtUtils::MakeMaker the user if not $ENV{AUTOMATED_TESTING}

Those are really your only options, unless flickr has an account specifically setup for testing environment, then you'd prompt the user to run network tests

Replies are listed 'Best First'.
Re^2: Flickr OAuth module and testing
by CountZero (Bishop) on May 21, 2015 at 09:10 UTC
    Options 1 and 2 are probably more complicated to set up than my small module is worth.

    Option 3 or 4 is something I'll explore.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics