mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-03-01 01:53:36 +08:00
* Implement a basic DNSimple provider. Handles domain delegation as well as record create, update, and delete. Note that this is completely untested at the moment. It’s so alpha it might burn your face off. * Add some inline comments. Always use the StackExchange libs. * Clean up dnsimple docs a little * This will need to be changed before merging. * Import the dnsimple dnscontrol package from its expected path * Properly build the FQDN and implement record listing so create/update/delete are used correctly. * Add support for overriding base URL to allow connection to sandbox. * Vendor dnsimple-go and its dependencies. * Remove unnecessary doc file. * Use dnsutil.AddOrigin for combining record name and origin. * Modifying dnsimple provider to pass tests |
||
---|---|---|
.. | ||
integration_test.go | ||
providers.json | ||
readme.md |
Integration Tests
This is a simple framework for testing dns providers by making real requests.
There is a sequence of changes that are defined in the test file that are run against your chosen provider.
For each step, it will run the config once and expect changes. It will run it again and expect no changes. This should give us much higher confidence that providers will work in real life.
Configuration
providers.json
should have an object for each provider type under test. This is identical to the json expected in creds.json for dnscontrol, except it also has a "domain" field specified for the domain to test. The domain does not even need to be registered for most providers. Note that providers.json
expects environment variables to be specified with the relevant info.
Running a test
- Define all environment variables expected for the provider you wish to run. I setup a local
.env
file with the appropriate values and use zoo to run my commands. - run
go test -v -provider $NAME
where $NAME is the name of the provider you wish to run.