refactor(gotests): use new runner
This commit is contained in:
parent
55ee6bd9d6
commit
883b92b63d
1 changed files with 5 additions and 9 deletions
|
|
@ -67,16 +67,12 @@ local function add_test(args)
|
|||
|
||||
log.debug("generating tests with args: ", args)
|
||||
|
||||
return r.sync(c.commands.gotests, {
|
||||
args = args,
|
||||
on_exit = function(data, status)
|
||||
if not status == 0 then
|
||||
error("gotests failed: " .. data)
|
||||
end
|
||||
local rs = r.sync { c.commands.gotests, unpack(args) }
|
||||
if rs.code ~= 0 then
|
||||
error("gotests failed: " .. rs.stderr)
|
||||
end
|
||||
|
||||
u.notify "unit test(s) generated"
|
||||
end,
|
||||
})
|
||||
u.notify "unit test(s) generated"
|
||||
end
|
||||
|
||||
-- generate unit test for one function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue