summaryrefslogtreecommitdiffstats
path: root/tests/config/test.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/config/test.cfg')
-rw-r--r--tests/config/test.cfg27
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