AnalogJ / lexicon

Manipulate DNS records on various DNS providers in a standardized way.
MIT License
1.48k stars 304 forks source link

Credentials for paid providers #202

Open AnalogJ opened 6 years ago

AnalogJ commented 6 years ago

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:

jvanasco commented 6 years ago

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
AnalogJ commented 6 years ago

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.

jvanasco commented 6 years ago

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.

trinopoty commented 4 years ago

I can provide recordings for a few providers, viz. Linode, Godaddy, Cloudflare. I personally use Linode and Godaddy and Cloudflare is free.

trinopoty commented 4 years ago

And also AWS if need be. I use AWS and can easily create a new domain to get recordings.