diff --git a/NEWS b/NEWS index d54bb03bac9294f44583b9c42e0582fe2454403a..823b5ea894dbce7307f9294a0bc774f05ccdb430 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +Knot Resolver 3.x.y (2019-0m-dd) +================================ + +Bugfixes +-------- +- predict module: load stats module if config didn't specify period (!755) + + Knot Resolver 3.2.1 (2019-01-10) ================================ diff --git a/modules/predict/predict.lua b/modules/predict/predict.lua index 846d4ef7d53867f64e364d66631d393938fcbd51..470700f3b2a3bc59421a01d691a46f19e35bc9c0 100644 --- a/modules/predict/predict.lua +++ b/modules/predict/predict.lua @@ -158,7 +158,10 @@ end function predict.config(config) -- Reconfigure - if type(config) ~= 'table' then return end + config = config or {} + if type(config) ~= 'table' then + error('[predict] configuration must be a table or nil') + end if config.window then predict.window = config.window end if config.period then predict.period = config.period end -- Load dependent modules diff --git a/modules/predict/tests/predict.test.lua b/modules/predict/tests/predict.test.lua index 10431045e60d4c4bfef37a83e9dc1fb8c6024b6e..3d7c7f7d24e3916f22a693aea22d2ab0b04f72be 100644 --- a/modules/predict/tests/predict.test.lua +++ b/modules/predict/tests/predict.test.lua @@ -1,5 +1,5 @@ -- setup resolver -modules = { 'predict', 'stats' } +modules = { 'predict' } -- mock global functions local resolve_count = 0