summaryrefslogtreecommitdiffstats
path: root/tests/config/test.cfg
blob: a49c0f4d17249ed0d3493da0d977af783e186b94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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