diff --git a/spec/01-unit/21-dns-client/03-client_cache_spec.lua b/spec/01-unit/21-dns-client/03-client_cache_spec.lua index 715dc8da2b51..e7d3e976ceb6 100644 --- a/spec/01-unit/21-dns-client/03-client_cache_spec.lua +++ b/spec/01-unit/21-dns-client/03-client_cache_spec.lua @@ -493,7 +493,7 @@ describe("[DNS client cache]", function() assert(client.init(config)) lrucache = client.getcache() - query_func = function(self, original_query_func, qname, opts) + resolver.query_func = function(self, original_query_func, qname, opts) return mock_records[qname..":"..opts.qtype] or { errcode = 3, errstr = "name error" } end end)