aboutsummaryrefslogtreecommitdiff
path: root/plugin/test/helpers.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-07-09plugin/cache: Unset AD flag when DO is not set for cache miss (#4736)Gravatar Chris O'Haver 1-8/+9
* unset AD bit when client DO is 0 Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add flag check to existing tests Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-02-23Rewrite SRV targets and additional names in response (#4287)Gravatar slick-nic 1-0/+3
* Rewrite plugin - rewrite SRV targets and names in response answer and additional records Signed-off-by: Nic Colledge <nic@njcolledge.net> * Added README content to describe new behaviour Signed-off-by: Nic Colledge <nic@njcolledge.net> * Added more record types to rewrite handling based on PR/Issue feedback Signed-off-by: Nic Colledge <nic@njcolledge.net> * Updated README.md for plugin Signed-off-by: Nic Colledge <nic@njcolledge.net> * Updated unit tests. Small refactor of getTarget... function. Signed-off-by: Nic Colledge <nic@njcolledge.net> * Refactor to add response value rewrite as answer value option Signed-off-by: Nic Colledge <nic@njcolledge.net> * Removed TODO comment, added test for NAPTR record. Signed-off-by: Nic Colledge <nic@njcolledge.net>
2020-09-22goreport card fixes (#4139)Gravatar Miek Gieben 1-1/+1
This fixes some inefassign as report by Go report card: https://goreportcard.com/report/github.com/coredns/coredns Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-01Fix some typos in comments. (#4100)Gravatar Hu Shuai 1-1/+1
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2019-02-27Fix error string should not be capitalized (#2608)Gravatar Nguyen Quang Huy 1-4/+4
From [Golang coding convention](https://github.com/golang/go/wiki/CodeReviewComments#error-strings) Co-Authored-By: Nguyen Van Trung [trungnvfet@outlook.com](mailto:trungnvfet@outlook.com) Signed-off-by: Nguyen Quang Huy [huynq0911@gmail.com](mailto:huynq0911@gmail.com)
2019-02-20Remove some duplicate worlds (#2582)Gravatar Nguyen Phuong An 1-1/+1
Signed-off-by: Nguyen Phuong An <AnNP@vn.fujitsu.com>
2019-01-27golint fix (#2504)Gravatar Yong Tang 1-4/+1
This PR is a small golint fix: ``` coredns/plugin/test/helpers.go Line 283: warning: redundant if ...; err != nil check, just return error instead. (golint) ``` Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-19Stop importing testing in the main binary (#2479)Gravatar Miek Gieben 1-78/+46
* Stop importing testing in the main binary Stop importing "testing" into the main binary: * test/helpers.go imported it; remote that and change function signature * update all tests that use this Signed-off-by: Miek Gieben <miek@miek.nl> * Drop import testing from metrics plugin Signed-off-by: Miek Gieben <miek@miek.nl> * more fiddling Signed-off-by: Miek Gieben <miek@miek.nl>
2018-06-02presubmit: Check errorf as well (#1845)Gravatar Miek Gieben 1-20/+20
Uppercase all these test errors as well. And extend the presubmit to check for these in the future. Also do a slightly smarter grep to only get t.<something>. as (because dump regexp) this also grep over non test files.
2018-04-22all: fix plugin import ordering (#1717)Gravatar Miek Gieben 1-2/+1
Got a bit messed up with stb lib "context" usage.
2018-04-20global: move to context (#1699)Gravatar Miek Gieben 1-1/+2
* global: move to context Move from golang.org/x/net/context to std lib's context. Change done with: for i in $(grep -l '/context' **/*.go); do sed -e 's|golang.org/x/net/context|context|' -i $i; echo $i; done for i in **/*.go; do goimports -w $i; done * drop from dns.pb.go as well
2018-02-06plugin/rewrite: rewrite responses for all record types (#1460) (#1463)Gravatar Paul Greenberg 1-0/+10
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-0/+348
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat