lexicon
lexicon copied to clipboard
Credentials for paid providers
We should ask all paid providers if they would be willing to give us test accounts so that we can create recordings quicker.
In addition we should ask on letsencrypt and provider support forums for volunteers who would be willing to generate recordings for us as we augment the test suite.
Volunteers should be developers, as we need people who can determine why the update test suite is failing, and make fixes to the provider, and re-submit. Volunteers should be tracked in the CODEOWNERS file
Potential volunteer sources:
- [ ] myself, ask for credentials directly from provider
- [ ] lets encrypt forum
- [ ] lets encrypt reddit.
- [ ] provider support forum/slack
- [ ] twitter (letencrypt & provider specific)
- [ ] stack overflow?
It would be great if the tests were more pluggable too. Working with the namecheap provider, the 'domain name' is hardcoded. To make changes and run tests against the real API, this needs an override, such as (in the provider):
@property
def domain(self):
env_domain = os.environ.get('LEXICON_NAMECHEAP_DOMAIN', None)
return env_domain or 'lexicontest.com' # fallback to original domain
not sure what you mean @jvanasco , you should be able to change the domain to anything you want by modifying:
https://github.com/AnalogJ/lexicon/blob/master/tests/providers/test_namecheap.py#L15
lexicontest.com
is a made up domain that someone else decided to use, it could be anything you set it to.
The only restriction is that we can't vary the domain between provider tests, so if you do change it, you'll need to wipe out all the recordings and re-create them.
Namecheap's "sandbox" API is global, so the made up lexicontest
domain is locked into the account/credentials of that user. The way the tests are setup with hardcoded domains, everyone who needs to hit the "real" API (new functionality, edits, testing a library change) must edit the test file to change the domain (in addition to deleting the cassettes).
Using a class property, like in my example, means developers wouldn't have to edit the test file to customize it -- it would be all run locally.
Eventually this library will likely be on a CI build that doesn't just check against the cassette recordings, but against live services. For that to happen, you'll need the ability to customize the domain in each provider test.
I can provide recordings for a few providers, viz. Linode, Godaddy, Cloudflare. I personally use Linode and Godaddy and Cloudflare is free.
And also AWS if need be. I use AWS and can easily create a new domain to get recordings.