Skip to content
Snippets Groups Projects
Commit dcaab90f authored by Marek Vavruša's avatar Marek Vavruša
Browse files

tests: added console assertions to config file template

parent e89cc876
Branches
Tags
No related merge requests found
......@@ -32,7 +32,7 @@ before_script:
- ./scripts/bootstrap-depends.sh ${HOME}/.local
script:
- make ${MAKEOPTS} install COVERAGE=1 PREFIX=${HOME}/.local
- make check COVERAGE=1 PREFIX=${HOME}/.local
- make ${MAKEOPTS} check COVERAGE=1 PREFIX=${HOME}/.local
after_success:
- test $TRAVIS_OS_NAME = linux && coveralls -i lib -i daemon -x ".c" --gcov-options '\-lp'
sudo: false
......
net.listen('{{SELF_ADDR}}',53)
cache.size = 10*MB
modules = {'block','hints'}
cache.size = 1*MB
modules = {'stats', 'block', 'hints'}
hints.root({['k.root-servers.net'] = '{{ROOT_ADDR}}'})
option('NO_MINIMIZE', {{NO_MINIMIZE}})
option('ALLOW_LOCAL', true)
-- Self-checks on globals
assert(help() ~= nil)
assert(worker.id ~= nil)
-- Self-checks on facilities
assert(cache.count() == 0)
assert(cache.stats() ~= nil)
assert(cache.backends() ~= nil)
assert(worker.stats() ~= nil)
assert(net.interfaces() ~= nil)
-- Self-checks on loaded stuff
assert(net.list()['{{SELF_ADDR}}'])
assert(#modules.list() > 0)
-- Self-check timers
ev = event.recurrent(1 * sec, function (ev) return 1 end)
event.cancel(ev)
ev = event.after(0, function (ev) return 1 end)
......@@ -236,6 +236,8 @@ def play_object(path, binary_name, config_name, j2template, binary_additional_pa
# Wait until the server accepts TCP clients
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
while True:
if daemon_proc.poll() != None:
raise Exception('process died "%s", logs in "%s"' % (os.path.basename(binary_name), TMPDIR))
try:
sock.connect((testserver.get_local_addr_str(socket.AF_INET, CHILD_IFACE), 53))
except: continue
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment