aboutsummaryrefslogtreecommitdiff
path: root/middleware/kubernetes/handler_test.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-22mw/kubernetes: Rewrite parseRequest and Readability improvements (#939)Gravatar Miek Gieben 1-8/+39
* mw/kubernetes: rewrite parseRequest Stop looking at the qtype in parseRequest and make k.Namespace a map. Fallout from this is that pkg/strings as it is not used anymore. Also add a few helper functions to make unexposed namespaces easier to see in the code. Add wildcard tests to the middleware tests. * Fix tests Add a whole bunch of comments to document what we are trying to do. * This is now answered * up coverage * duh * Update testcase * Make it nodata
2017-08-18mw/federation: add federation back as separate mw for k8s (#929)Gravatar Miek Gieben 1-4/+2
* mw/federaration This PR add the federation back as a middleware to keep it more contained from the main kubernetes code. It also makes parseRequest less import and pushes this functionlity down in the k.Entries. This minimizes (or tries to) the importance for the qtype in the query. In the end the qtype checking should only happen in ServeDNS - but for k8s this might proof difficult. Numerous other cleanup in code and kubernetes tests. * up test coverage
2017-08-16tests: add SortAndCheck helper (#926)Gravatar Miek Gieben 1-19/+1
There was quite some code duplication in a lot of tests to check if an answer was considered Ok. Created a test.SortAndCheck helper function that takes care of this.
2017-08-16mw/kubernetes: add reverse_test.go (#922)Gravatar Miek Gieben 1-15/+9
This PR adds a reverse tests that copies some of it from the main integration test. This aids in local testing because you don't need a full k8s setup running. It does the most minimal testing, a successful return and a nodata response that includes the SOA for in-addr.arpa.
2017-08-14mw/kubernetes: remove federation and cidr (#916)Gravatar Miek Gieben 1-27/+0
* mw/kubernetes: remove federation and cidr Remove both as we have a corefile syntax change that handles cidr and remove federation because that is going to be its own middleware. * backwards incompat changes This PR: * removes cidr from kubernetes (core Corefile feature now) * removes federation from kubernets (comes back as new middleware) * [remove autopath - which was already gone, so that already was backwards incompat] * adds `fallthrough` to the *etcd* middleware and makes you enable it. * Fail on unknown properties * documentation * Disable TestHealthCheck as it uses realtime and fails
2017-08-07mw/kubernetes: autopath refactors (#850)Gravatar Miek Gieben 1-150/+4
Factor out as much of autopath into a subpackage as possible right now. apw.Sent is not needed, we should see this from the rcode returned by the middleware. See #852 on why this was needed. Disable the tests for now as to not break the main build.
2017-08-07middleware/kubernetes: autopath in sub package (#848)Gravatar Miek Gieben 1-5/+6
Put the autopath stuff in a separate sub package. Tests are still included in the main kubernetes directory. Next steps (after this is merged), is pulling the autopath handling into the subpackage and fixing the tests.
2017-08-06all: gometalinter (#843)Gravatar Miek Gieben 1-10/+10
* kubernetes/reverse: remove deadcode * deadcode in errors and kubernetes removed * unnecessary conversion * constants * proxy: time.Since() * simplications * static check * Disable test/external_test
2017-08-03middleware/kubernetes: cleanup (#818)Gravatar Miek Gieben 1-1/+1
Drop the interfaceAddr interfaces and just use a function. Cleanup all fallout from that. Remove the use of global variables and cleanup the tests a bit.
2017-08-03Middleware/k8s: Add unit tests for Pods (#815)Gravatar Sandeep Rajan 1-2/+76
* Added Pod testing * Cleanup * fixed formatting
2017-08-02Add TXT coverage (#807)Gravatar Sandeep Rajan 1-0/+7
2017-07-20middleware/kubernetes: fix aaaa response (#780)Gravatar Chris O'Haver 1-0/+16
* fix aaaa response * unit tests
2017-07-11k8s/autopath: Add CNAMES (#771)Gravatar Chris O'Haver 1-0/+462
* Add unit tests & cnames * more progress * fix * next mw dependent unit tests * add tests for OnNXDOMAIN * Add AAAA and ndots unit tests; fix request.NewWithQuestion * Correct default value in README * add CNAMEs to readme * review * fix autopath examples * fix and test CNAME response order