Commit graph

15 commits

Author SHA1 Message Date
xuweiwei
c1857f4889
plugin/file: unified NoData result (#5086)
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2022-04-25 12:05:24 -04: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
xuweiwei
86a5902209
plugin/file: add TXT RR test case (#5079)
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2022-02-17 13:58:18 -05:00
xuweiwei
56ee0efa69
plugin/file: add a test case for wildcard RRs do not apply (#5078)
From RFC 1034 ...

Wildcard RRs do not apply:
[...]

When the query name or a name between the wildcard domain and
the query name is know to exist. For example, if a wildcard
RR has an owner name of "*.X", and the zone also contains RRs
attached to B.X, the wildcards would apply to queries for name
Z.X (presuming there is no explicit information for Z.X), but
not to B.X, A.B.X, or X.

Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2022-01-08 06:03:28 -08:00
Chris O'Haver
158ad2d738
plugin/file/auto: Write CNAME answer to client even if target lookup is SERVFAIL (#4863)
* write cname answer to client even if target lookup is servfail

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* fix existing unit test expectations

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-09-14 10:08:22 +02:00
Kohei Yoshida
5f6baf2973
plugin/file: fix wildcard CNAME answer (#4828)
* plugin/file: fix wildcard CNAME answer

Signed-off-by: Yoshida <ykhr53@yokohei.com>

* plugin/file: fix synthesized CNAME answer

Signed-off-by: Yoshida <ykhr53@yokohei.com>
2021-09-07 12:21:11 -07:00
Miek Gieben
163ac033ae
Revert "plugin/file: Fix in wrong answers returned when wildcard and concrete records exist (#4599)" (#4633)
reverting as I don't want to release 1.8.4 with this enabled.

This reverts commit fbf3f07f46.
2021-05-20 16:25:18 -04:00
Jason Du
fbf3f07f46
plugin/file: Fix in wrong answers returned when wildcard and concrete records exist (#4599)
* plugin/file: Fix in wrong answers returned when wildcard and concrete records exist

Signed-off-by: Jason Du <xdu@infoblox.com>

* Remove superfluous change

Signed-off-by: Jason Du <xdu@infoblox.com>

* Re-implementation and new test case
If the domain's terminal is neither the matching wildcard, nor a domian directly
under the wildcard, return NXDOMAIN

Signed-off-by: Jason Du <xdu@infoblox.com>

* Fix empty non-terminal & add test case

Signed-off-by: Jason Du <xdu@infoblox.com>

* Cleanup

Signed-off-by: Jason Du <xdu@infoblox.com>

* Fix case on domain name with character before * and add more test cases

Signed-off-by: Jason Du <xdu@infoblox.com>

* Use different IPs for records in cornerCasesWildcard zone file

Signed-off-by: Jason Du <xdu@infoblox.com>
2021-05-17 13:21:08 -07: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
643550eabe presubmit: check for uppercase (#1774)
Another thing we can test automatically, we sorta settled on using an
uppercase letter in in t.Log and t.Fatal calls.

Let's just check for this.
2018-05-07 23:47:25 +02: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
Miek Gieben
284061eee7 pkg: add dnstest (#1098)
Add a full test server impl in this new package + tests. Move
dnsrecorder into this package as well and finish up the commented out
tests that were left in the old dnsrecorder package.

Update all callers and tests.
2017-09-21 15:15:47 +01: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/file/lookup_test.go (Browse further)