coredns/test
Miek Gieben 35b40a84f2
plugin/cache: Fix filtering (#4148)
The filtering of DNSSEC records in the cache plugin was not done
correctly. Also the change to introduced this bug didn't take into
account that the cache - by virtue of differentiating between DNSSEC and
no-DNSSEC - relied on not copying the data from the cache.

This change copies and then filters the data and factors the filtering
into a function that is used in two places (albeit with on ugly boolean
parameters to prevent copying things twice).

Add tests, do_test.go is moved to test/cache_test.go because the OPT
handing is done outside of the cache plugin. The core server re-attaches
the correct OPT when replying, so that makes for a better e2e test.

Added small unit test for filterRRslice and an explicit test that asks
for DNSSEC first and then plain, and vice versa to test cache behavior.

Fixes: #4146

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-28 07:53:00 -07:00
..
auto_test.go Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
cache_test.go plugin/cache: Fix filtering (#4148) 2020-09-28 07:53:00 -07:00
chaos_test.go For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
compression_scrub_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
doc.go Run gostaticheck (#3325) 2019-10-01 07:41:29 +01:00
ds_file_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
edns0_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
erratic_autopath_test.go cleanup tempfiles for erratic_autopath_test (#4080) 2020-08-20 06:11:56 -07:00
etcd_cache_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
etcd_credentials_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
etcd_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
example_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_cname_proxy_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_reload_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_serve_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_srv_additional_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_test.go Remove duplicated TempFile testsuit (#2508) 2019-01-28 07:25:14 +00:00
file_upstream_test.go Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
file_xfr_test.go Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
fuzz_corefile.go fuzz: use gofuzz build tag instead of fuzz (#3185) 2019-08-25 13:02:44 +00:00
grpc_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
hosts_file_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
log_test.go Clean up tests logging (#1979) 2018-07-19 16:23:06 +01:00
metric_naming_test.go fix metric naming test (#4017) 2020-07-21 10:15:55 +02:00
metrics_test.go Cleanup tempfiles (#3986) 2020-07-02 09:10:36 +02:00
miek_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
plugin_dnssec_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
presubmit_test.go For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
proxy_health_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
proxy_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
readme_test.go For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
reload_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
reverse_test.go Default to upstream to self (#2436) 2019-01-13 16:54:49 +00:00
rewrite_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
secondary_test.go Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
server.go For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
server_reverse_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
server_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
template_upstream_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
wildcard_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00