coredns / fallback

The fallback plugin allows sending queries to alternate upstreams based on rcodes returned from the plugin chain.
Apache License 2.0
12 stars 17 forks source link

Add "original" option to send original query through fallback #7

Closed ekleiner closed 6 years ago

ekleiner commented 6 years ago

This implements feature https://github.com/coredns/fallback/issues/6

codecov-io commented 6 years ago

Codecov Report

Merging #7 into master will increase coverage by 1.88%. The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
+ Coverage   77.77%   79.66%   +1.88%     
==========================================
  Files           2        2              
  Lines          45       59      +14     
==========================================
+ Hits           35       47      +12     
- Misses          7        8       +1     
- Partials        3        4       +1
Impacted Files Coverage Δ
fallback.go 83.33% <100%> (+4.38%) :arrow_up:
setup.go 77.14% <81.81%> (+0.21%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2b230be...bd445b1. Read the comment docs.

yuewko commented 6 years ago

@ekleiner , looks good.

I do think you need at least a couple of UTs to verify that the ORIGINAL option does work as intended. I suggest enhancing the stubNextHandler and dummyUpstream in fallback_test.go to do that.

yuewko commented 6 years ago

LGTM!

fturib commented 6 years ago

@yuewko, @johnbelamaric : if you are ok with last change, can you "approve" this PR ?