diff options
author | Corentin Le Gall <corentinlgs@gmail.com> | 2018-07-11 15:56:16 +0200 |
---|---|---|
committer | Corentin Le Gall <corentinlgs@gmail.com> | 2018-07-17 14:03:43 +0200 |
commit | de3438a1e6522c6eb239b5642116a8652df3de23 (patch) | |
tree | c21ae29a356e1ce6e2fa03dc616523c5187d8272 /conf.d/controller/lua.d/helloworld.lua | |
parent | e0a71da9fe0242a50a2d940597c46bb488c5ca84 (diff) |
README + helloworld: New test functions + doc
Fixed, tested and documented setBefore and setAfter functions.
Improved doc for updated functions in aft.lua.
Change-Id: Idc7ffc06e98ef7f6af1e06d9e6cda0dcbd4f97b8
Signed-off-by: Corentin Le Gall <corentinlgs@gmail.com>
Diffstat (limited to 'conf.d/controller/lua.d/helloworld.lua')
-rw-r--r-- | conf.d/controller/lua.d/helloworld.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/conf.d/controller/lua.d/helloworld.lua b/conf.d/controller/lua.d/helloworld.lua index 17cfa84..8fcf077 100644 --- a/conf.d/controller/lua.d/helloworld.lua +++ b/conf.d/controller/lua.d/helloworld.lua @@ -25,7 +25,6 @@ end function _callbackError(responseJ) _AFT.assertStrContains(responseJ.request.info, "Ping Binder Daemon fails") end - function _callbackEvent(eventName, eventData) _AFT.assertEquals(eventData, {data = { key = 'weird others data', another_key = 123.456 }}) end @@ -34,6 +33,9 @@ _AFT.addEventToMonitor("hello/anEvent") _AFT.addEventToMonitor("hello/anotherEvent", _callbackEvent) _AFT.testVerbStatusSuccess('testPingSuccess','hello', 'ping', {}) +_AFT.setBefore("testPingSuccess",function() print("~~~~~ Begin testPingSuccess ~~~~~") end) +_AFT.setAfter("testPingSuccess",function() print("~~~~~ End testPingSuccess ~~~~~") end) + _AFT.testVerbResponseEquals('testPingSuccessAndResponse','hello', 'ping', {}, "Some String") _AFT.testVerbResponseEquals('testPingSuccessResponseFail','hello', 'ping', {}, "Unexpected String") _AFT.testVerbCb('testPingSuccessCallback','hello', 'ping', {}, _callback) @@ -53,9 +55,5 @@ _AFT.testVerbStatusSuccess('testEventPushanotherEvent', 'hello', 'eventpush', {t _AFT.testVerbStatusSuccess('testGenerateWarning', 'hello', 'verbose', {level = 4, message = 'My Warning message!'}) -_AFT.testEvtReceived("testanEventReceived", "hello/anEvent") -_AFT.testEvtReceived("testanotherEventReceived", "hello/anotherEvent") - -_AFT.describe("mytest", function() - _AFT.assertEquals(false, false) -end) +_AFT.testEvtReceived("testanEventReceived", "hello/anEvent",3000000) +_AFT.testEvtReceived("testanotherEventReceived", "hello/anotherEvent",3000000) |