Make get and call_sync error
Signed-off-by: Rahix <rahix@rahix.de>
This commit is contained in:
parent
4b5fcf3d99
commit
1b73d0d04c
4 changed files with 17 additions and 13 deletions
|
|
@ -26,7 +26,9 @@ function test_get_network_robust()
|
|||
)
|
||||
|
||||
assert_equal(123, bc2:get("getrob1"), "wrong value")
|
||||
assert_nil(bc2:get("getrob2"), "found non-exisiting")
|
||||
assert_error_match("unknown", function()
|
||||
bc2:get("getrob2")
|
||||
end)
|
||||
end
|
||||
|
||||
function test_call_sync_network_robust()
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ function test_get()
|
|||
bc:finalize()
|
||||
|
||||
assert_equal(1234, bc:get("get1"), "wrong value for noun")
|
||||
assert_equal(nil, bc:get("get2"), "got value for non-exisiting noun")
|
||||
assert_error_match("unknown", function()
|
||||
bc:get("get2")
|
||||
end)
|
||||
assert_error_match("not a noun", function()
|
||||
bc:get("get2v")
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ function test_get_network()
|
|||
local bc2 = BaseControl:new()
|
||||
|
||||
assert_equal(123, bc2:get("getnw1"), "wrong value")
|
||||
assert_nil(bc2:get("getnw2"), "found non-exisiting")
|
||||
assert_error_match("unknown", function()
|
||||
bc2:unknown("getnw2")
|
||||
end)
|
||||
end
|
||||
|
||||
function test_call_network()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue