diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
commit | 3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch) | |
tree | f87bd4a126b3a843858eb447e8fd5893c3ee3882 /tests/config/test.cfg | |
parent | Initial commit. (diff) | |
download | knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.tar.xz knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.zip |
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/config/test.cfg')
-rw-r--r-- | tests/config/test.cfg | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/config/test.cfg b/tests/config/test.cfg new file mode 100644 index 0000000..a49c0f4 --- /dev/null +++ b/tests/config/test.cfg @@ -0,0 +1,27 @@ +package.path = package.path .. ';' .. env.SOURCE_PATH .. '/?.lua' +TEST_DIR = env.TEST_FILE:match('(.*/)') + +-- export testing module in globals +local tapered = require('tapered.src.tapered') +for k, v in pairs(tapered) do + _G[k] = v +end + +-- don't send priming queries etc. +modules.unload 'priming' +modules.unload 'ta_signal_query' + +-- load test +local tests = dofile(env.TEST_FILE) + +-- run test after processed config file +-- default config will be used and we can test it. +if tests then + local runtest = require('test_utils').test + worker.coroutine(function () + for _, t in ipairs(tests) do + runtest(t) + end + done() + end) +end
\ No newline at end of file |