map() now depends on presence of control sockets, and by default config
tests are executed with KRESD_NO_LISTEN=1 env var which prevents control
sockets from being created. Tests for features which depend on map() now
explicitly create their own control socket.
-- do not listen, test is driven by config code
env.KRESD_NO_LISTEN = true
+local path = worker.cwd..'/control/'..worker.pid
+same(true, net.listen(path, nil, {kind = 'control'}),
+ 'new control sockets were created so map() can work')
+
modules.load('hints > iterate')
modules.load('daf')
-- skipping daf module test because http its not installed
os.exit(77)
else
+ local path = worker.cwd..'/control/'..worker.pid
+ same(true, net.listen(path, nil, {kind = 'control'}),
+ 'new control sockets were created so map() can work')
+
local request = require('http.request')
modules.load('http')
-- skipping http module test because its not installed
os.exit(77)
else
+ local path = worker.cwd..'/control/'..worker.pid
+ same(true, net.listen(path, nil, {kind = 'control'}),
+ 'new control sockets were created so map() can work')
+
local request = require('http.request')
modules.load('http')