diff options
Diffstat (limited to 'conf.d/controller')
-rw-r--r-- | conf.d/controller/lua.d/aftTest.lua | 2 | ||||
-rw-r--r-- | conf.d/controller/lua.d/helloworld.lua | 14 |
2 files changed, 6 insertions, 10 deletions
diff --git a/conf.d/controller/lua.d/aftTest.lua b/conf.d/controller/lua.d/aftTest.lua index ed3ece3..4dc93b8 100644 --- a/conf.d/controller/lua.d/aftTest.lua +++ b/conf.d/controller/lua.d/aftTest.lua @@ -103,5 +103,5 @@ _AFT.describe("testAssertVerbStatusSuccess",function() _AFT.assertVerbStatusSucc _AFT.describe("testAssertVerbResponseEquals",function() _AFT.assertVerbResponseEquals('hello', 'ping', {},"Some String") end) _AFT.describe("testAssertVerbCb",function() _AFT.assertVerbCb('hello', 'ping', {},_callback) end) _AFT.describe("testAssertVerbStatusError",function() _AFT.assertVerbStatusError('hello', 'pingfail', {}) end) -_AFT.describe("testAssertVerbResponseEqualsError",function() _AFT.assertVerbResponseEqualsError('hello', 'pingfail', {},"Ping Binder Daemon fails") end) +_AFT.describe("testAssertVerbResponseEqualsError",function() _AFT.assertVerbResponseEqualsError('hello', 'nonexistentverb', {},"Ping Binder Daemon fails") end) _AFT.describe("testAssertVerbCbError",function() _AFT.assertVerbCbError('hello', 'pingfail', {},_callbackError) end) diff --git a/conf.d/controller/lua.d/helloworld.lua b/conf.d/controller/lua.d/helloworld.lua index 41ba603..2e99a6e 100644 --- a/conf.d/controller/lua.d/helloworld.lua +++ b/conf.d/controller/lua.d/helloworld.lua @@ -26,7 +26,7 @@ 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 }}) + _AFT.assertEquals(eventData, { key = 'weird others data', another_key = 123.456 }) end _AFT.addEventToMonitor("hello/anEvent") @@ -37,12 +37,10 @@ _AFT.setBefore("testPingSuccess",function() print("~~~~~ Begin testPingSuccess ~ _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) _AFT.testVerbStatusError('testPingError', 'hello', 'pingfail', {}) -_AFT.testVerbResponseEqualsError('testPingErrorAndResponse', 'hello', 'pingfail', {}, "Ping Binder Daemon fails") -_AFT.testVerbResponseEqualsError('testPingErrorResponseFail', 'hello', 'pingfail', {}, "Ping Binder Daemon succeed") +_AFT.testVerbResponseEqualsError('testPingErrorAndResponse', 'hello', 'pingfail', {}, "Ping Binder Daemon succeeds") _AFT.testVerbCbError('testPingErrorCallback', 'hello', 'pingfail', {}, _callbackError) _AFT.testVerbStatusSuccess('testEventAddanEvent', 'hello', 'eventadd', {tag = 'event', name = 'anEvent'}) @@ -55,9 +53,7 @@ _AFT.testVerbStatusSuccess('testEventPushanotherEvent', 'hello', 'eventpush', {t _AFT.testVerbStatusSuccess('testGenerateWarning', 'hello', 'verbose', {level = 4, message = 'My Warning message!'}) -_AFT.testEvtGrpReceived("testEventGroupReceived",{["hello/anEvent"]=1,["hello/anotherEvent"]=1},300000) -_AFT.testEvtGrpReceived("testEventGroupReceived",{["hello/anEvent"]=2,["hello/anotherEvent"]=1},300000) -_AFT.testEvtGrpReceived("testEventGroupReceived",{["hello/anEvent"]=0,["hello/anotherEvent"]=0},300000) +_AFT.testEvtGrpReceived("testEventGroupReceived",{["hello/anEvent"]=1,["hello/anotherEvent"]=1}) -_AFT.testEvtReceived("testanEventReceived", "hello/anEvent",300000) -_AFT.testEvtReceived("testanotherEventReceived", "hello/anotherEvent",300000) +_AFT.testEvtReceived("testanEventReceived", "hello/anEvent") +_AFT.testEvtReceived("testanotherEventReceived", "hello/anotherEvent") |