dnscontrol/docs
Phil Pennock 4fed6534c7
Tests: ensure provider capabilities are checked (#650)
* Tests: ensure provider capabilities are checked

Adds test: `TestCapabilitiesAreFiltered`

We have a number of records and pseudo-records which in theory can only
be used with a given provider if that provider indicates support.  In
practice, we've been missing the checks for that support and have been
passing the records down anyway.  The advice comment in the
providers/capabilities.go file to edit `checkProviderCapabilities()` has
not been reliably followed.

We need an internal self-consistency test.  The constants are not
directly exported or enumerable based solely on the package interfaces
at run-time, but with source access for a test suite, we can use the
`go/ast` and related interfaces to examine the code, extract all the
constants from a given package, figure out which ones we want to be
handled, and then insist that they're handled.

Before my recent work, we only checked:

    ALIAS PTR SRV CAA TLSA

After this commit, we check:

    ALIAS AUTODNSSEC CAA NAPTR PTR R53_ALIAS SSHFP SRV TLSA

I've added `AUTODNSSEC` as a new feature; `SSHFP` and `PTR` were caught
in other recent commits from me; implementing this test caused me to
have to add `NAPTR` and `R53_ALIAS`.  I whitelist `CanUseTXTMulti` as a
special-case.

This should prevent regressions.  We will probably want to post publicly
to warn people that if they're using SSHFP/PTR/NAPTR/R53_ALIAS then they
should check the feature matrix and if they don't see their provider
listed, to report is as "hey that actually works" so we can update the
provider flags.  Bonus: our feature matrix will suddenly be more
accurate.

* Add comments/docs for capabilities authors

* fixup!

* fixup!
2020-02-25 07:22:32 -05:00
..
_functions Add AUTODNSSEC, implement for DNSimple (#640) 2020-02-22 07:09:31 -05:00
_includes BIND: Implement AutoDNSSEC (#648) 2020-02-22 13:27:24 -05:00
_layouts Website fixes (Part 1) (#223) 2017-10-11 08:33:17 -04:00
_providers Linting (#647) 2020-02-23 14:47:14 -05:00
assets ROUTE53: Documentation for AWS Token PR (#403) 2018-09-05 09:07:28 -04:00
css Website fixes (Part 1) (#223) 2017-10-11 08:33:17 -04:00
flattener Internals: Switch to v2 go.mod, drop GOPATH, and fix Azure Pipelines (#595) 2020-01-28 10:42:31 -05:00
public wip 2017-10-01 14:13:22 -04:00
_config.yml tweaks to gcloud 2017-03-12 16:02:46 -07:00
adding-new-rtypes.md Tests: ensure provider capabilities are checked (#650) 2020-02-25 07:22:32 -05:00
alias.md ROUTE53: Support Route53's ALIAS record type (#239) (#301) 2018-01-16 05:53:12 -05:00
bug-triage.md Docs: Clarify bug triage process (#606) 2020-01-28 14:36:28 -05:00
caa-builder.md General docs improvements (#481) 2019-05-20 22:33:50 -04:00
examples.md General docs improvements (#481) 2019-05-20 22:33:50 -04:00
get-certs.md Improve Lets Encrypt docs (#594) 2020-01-23 17:49:43 -05:00
get-zones.md get-zones: new output format nameonly; remove tsvfqdn (#644) 2020-02-21 14:59:47 -05:00
getting-started.md Add "get-zone" command (#613) 2020-02-18 08:59:18 -05:00
index.md Docs: Clarify bug triage process (#606) 2020-01-28 14:36:28 -05:00
js.md Website fixes (Part 1) (#223) 2017-10-11 08:33:17 -04:00
migrating.md Add "get-zone" command (#613) 2020-02-18 08:59:18 -05:00
nameservers.md DOC: Apply brand-preferred case (#429) 2019-05-23 09:29:21 -04:00
notifications.md Simple notification framework (#297) 2018-01-11 11:15:19 -05:00
opinions.md Add SIP/JABBER labels to underscore exception list (#453) 2019-03-04 12:11:25 -05:00
provider-list.md fixup! 2020-01-28 14:38:53 -05:00
release-engineering.md Clarify versions in RE 2020-02-14 15:01:39 -05:00
runDocker.sh adding docs again 2017-01-11 13:02:45 -07:00
spf-optimizer.md Bugfix: redirect: should be redirect= (#507) 2019-06-21 07:48:59 -04:00
toc.md Fix spf-optimizer TOC link (#434) 2018-12-29 10:28:41 -05:00
unittests.md DOCS: Fix many spelling errors (#471) 2019-05-11 21:32:52 -04:00
why-the-dot.md DOCS: Fix many spelling errors (#471) 2019-05-11 21:32:52 -04:00
writing-providers.md DNSimple: Implement GetZones and ListZones (#637) 2020-02-20 14:52:19 -05:00