test: API: fix tests after improved error capture

This commit is contained in:
Justin M. Keyes
2018-05-09 21:44:18 +02:00
parent 2326a4ac3a
commit 79a0d82755
3 changed files with 15 additions and 14 deletions

View File

@@ -87,15 +87,15 @@ describe('server', function()
local expected = {}
local v4 = '127.0.0.1:12345'
s = funcs.serverstart(v4)
if #s > 0 then
local status, _ = pcall(funcs.serverstart, v4)
if status then
table.insert(expected, v4)
pcall(funcs.serverstart, v4) -- exists already; ignore
end
local v6 = '::1:12345'
s = funcs.serverstart(v6)
if #s > 0 then
status, _ = pcall(funcs.serverstart, v6)
if status then
table.insert(expected, v6)
pcall(funcs.serverstart, v6) -- exists already; ignore
end