@@ -93,37 +93,50 @@ func TestProxy_Resolve_cache(t *testing.T) {
9393 wantCachedWithConf assert.BoolAssertionFunc
9494 wantCachedGlobal assert.BoolAssertionFunc
9595 name string
96+ dnssecEnabled bool
9697 prxCacheEnabled bool
9798 }{{
9899 customUpstreamConf : nil ,
99100 wantCachedWithConf : assert .True ,
100101 wantCachedGlobal : assert .True ,
101102 name : "global_cache" ,
103+ dnssecEnabled : true ,
102104 prxCacheEnabled : true ,
103105 }, {
104106 customUpstreamConf : newCustomUpstreamConfig (ups , true ),
105107 wantCachedWithConf : assert .True ,
106108 wantCachedGlobal : assert .False ,
107109 name : "custom_cache" ,
110+ dnssecEnabled : true ,
108111 prxCacheEnabled : false ,
109112 }, {
110113 customUpstreamConf : newCustomUpstreamConfig (ups , false ),
111114 wantCachedWithConf : assert .False ,
112115 wantCachedGlobal : assert .False ,
113116 name : "custom_cache_only_upstreams" ,
117+ dnssecEnabled : true ,
114118 prxCacheEnabled : false ,
115119 }, {
116120 customUpstreamConf : newCustomUpstreamConfig (ups , true ),
117121 wantCachedWithConf : assert .True ,
118122 wantCachedGlobal : assert .False ,
119123 name : "two_caches_enabled" ,
124+ dnssecEnabled : true ,
120125 prxCacheEnabled : true ,
121126 }, {
122127 customUpstreamConf : nil ,
123128 wantCachedWithConf : assert .False ,
124129 wantCachedGlobal : assert .False ,
125- name : "two_caches_disabled" ,
130+ name : "proxy_cache_disabled" ,
131+ dnssecEnabled : true ,
126132 prxCacheEnabled : false ,
133+ }, {
134+ customUpstreamConf : nil ,
135+ wantCachedWithConf : assert .False ,
136+ wantCachedGlobal : assert .False ,
137+ name : "dnssec_disabled" ,
138+ dnssecEnabled : false ,
139+ prxCacheEnabled : true ,
127140 }}
128141
129142 for _ , tc := range testCases {
@@ -132,6 +145,7 @@ func TestProxy_Resolve_cache(t *testing.T) {
132145 UDPListenAddr : []* net.UDPAddr {net .UDPAddrFromAddrPort (localhostAnyPort )},
133146 UpstreamConfig : upsConf ,
134147 CacheEnabled : tc .prxCacheEnabled ,
148+ DNSSECEnabled : tc .dnssecEnabled ,
135149 })
136150 require .NoError (t , err )
137151 require .NotNil (t , p )
0 commit comments