dnscontrol/integrationTest
Tom Limoncelli 1097c96fcc
New Provider: GANDI-LIVEDNS (API v5) (#320)
* Add gandi LiveDNS api provider
* vendor testify and gandi live DNS
* govendor update github.com/prasmussen/gandi-api/{client,live_dns}
* Fix Gandi-livedns TXT unit test
* TravisCI should use go 1.10
2018-02-24 13:40:18 -05:00
..
config Better .gitignore of integration test stuff. (#316) 2018-02-05 10:28:58 -05:00
zones Better .gitignore of integration test stuff. (#316) 2018-02-05 10:28:58 -05:00
integration_test.go New Provider: GANDI-LIVEDNS (API v5) (#320) 2018-02-24 13:40:18 -05:00
providers.json New Provider: GANDI-LIVEDNS (API v5) (#320) 2018-02-24 13:40:18 -05:00
readme.md Integration Testing framework (#46) 2017-03-16 22:42:53 -07:00

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

  1. 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.
  2. run go test -v -provider $NAME where $NAME is the name of the provider you wish to run.