Commit graph

15 commits

Author SHA1 Message Date
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter (#5499) 2022-07-10 11:06:33 -07:00
xuweiwei
6788557507
plugin/file: add CAA record test case (#5219)
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2022-03-16 12:30:37 -04:00
Chris O'Haver
002b748ccd
plugin/cache: Unset AD flag when DO is not set for cache miss (#4736)
* 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-07-09 10:53:50 +02:00
slick-nic
0103931263
Rewrite SRV targets and additional names in response (#4287)
* 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>
2021-02-23 10:12:40 +01:00
Miek Gieben
24e668ecf0
goreport card fixes (#4139)
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-22 09:22:00 +02:00
Hu Shuai
e233f59ee8
Fix some typos in comments. (#4100)
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-09-01 09:10:45 +02:00
Nguyen Quang Huy
42cf6606fc Fix error string should not be capitalized (#2608)
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-27 08:25:02 -05:00
Nguyen Phuong An
e78d9a7893 Remove some duplicate worlds (#2582)
Signed-off-by: Nguyen Phuong An <AnNP@vn.fujitsu.com>
2019-02-20 07:12:21 -05:00
Yong Tang
4a9631cec3 golint fix (#2504)
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-27 17:55:07 +00:00
Miek Gieben
725becd134
Stop importing testing in the main binary (#2479)
* 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>
2019-01-19 11:23:13 +00:00
Miek Gieben
22c0b30d5f presubmit: Check errorf as well (#1845)
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-06-02 11:48:39 -07:00
Miek Gieben
0930eb8beb
all: fix plugin import ordering (#1717)
Got a bit messed up with stb lib "context" usage.
2018-04-22 08:34:35 +01:00
Miek Gieben
8722336fff
global: move to context (#1699)
* 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-04-20 11:01:06 +01:00
Paul Greenberg
f636930c5c plugin/rewrite: rewrite responses for all record types (#1460) (#1463) 2018-02-06 18:40:46 +00:00
Miek Gieben
d8714e64e4 Remove the word middleware (#1067)
* 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
2017-09-14 09:36:06 +01:00
Renamed from middleware/test/helpers.go (Browse further)