New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom location #8
Conversation
... which is useful for tests where we want to mock the user agent. Also, makes the authentication lazy and a hook before any request.
... and the auth request will trigger authentication, which will trigger a request, which will trigger an authentication, which... you get the drift. :-)
For the case where, for example, containers() needs the token before it uses a '_request' (and thus hasn't triggered a _authenticate() call yet.
Uses Test::LWP::UserAgent. Also, I'm not very familiar with the Rackspace stuff, so some of the test data might not make a lot of sense.
useful for testing, updated urls or using private clouds
Cool. Could you please add the new test dependencies to I don't have time yet to test it, but will probably be able to merge it this weekend. The offline testing is a very much wanted feature and the requirement to have an account to test this module has always been a bit of a pain. I'm pondering if it would be a wise thing to no longer do live tests, though it would make it a bit harder to make sure the module properly works with the webservice. What do you think? |
Updated dep. As for the online tests, I would put them in a different directory (that's what I did in one of my modules, see yanick/www-ohloh-api). The casual user probably won't want to use it, but it's always nice for the author to be able to run the online tests from time to time, just to make sure the API didn't change (or that things are still working when it did). |
For now I'll keep the current tests in |
Excellent. Thanks! |
The main goal of the patch is to make it possible to configure a custom localtion_url (useful for testing, amongst other things). Along the way I create tests that can be run offline, which you might be interested in (caveat: they require Test::LWP::UserAgent).