From 0def5c78e35fa88d71b22d46023e84b549bab4e2 Mon Sep 17 00:00:00 2001 From: Farshid Monhaseri Date: Sat, 7 Nov 2020 12:22:36 +0330 Subject: Fix & add tests -Fix the previous tests for subscribe/unsubscribe verbs. Now the calls for these verbs should contain at least 'event':'target-event'('monitor-devices' in this case) to be considered successful. -Add new test for new verb 'scan' with no filter & mask. Signed-off-by: Farshid Monhaseri Change-Id: I6b0b28b4a2221b774ce7476d947482745ce01ddf --- test/afb-test/tests/aft-BasicAPITests.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/afb-test/tests/aft-BasicAPITests.lua b/test/afb-test/tests/aft-BasicAPITests.lua index b2d4bdd..77b645a 100644 --- a/test/afb-test/tests/aft-BasicAPITests.lua +++ b/test/afb-test/tests/aft-BasicAPITests.lua @@ -52,6 +52,8 @@ _AFT.setBeforeAll(function() end end) +local ev_mon_arg = "monitor-devices" + -- This tests the 'get' verb of the platform-info API _AFT.testVerbStatusSuccess(testPrefix.."get", "platform-info", "get", ".layers.agl-manifest") @@ -61,8 +63,11 @@ _AFT.testVerbStatusSuccess(testPrefix.."get", "platform-info", "get", {}) -- This tests the 'set' verb of the platform-info API _AFT.testVerbStatusSuccess(testPrefix.."set", "platform-info", "set", {arg=".build.layers.agl-manifest.revision", value="test"}) --- This tests the 'subscribe' verb of the platform-info API -_AFT.testVerbStatusSuccess(testPrefix.."subscribe", "platform-info", "subscribe", {}) +-- This tests the 'subscribe' verb of the platform-info API for monitoring devices +_AFT.testVerbStatusSuccess(testPrefix.."subscribe", "platform-info", "subscribe", {event=ev_mon_arg}) + +-- This tests the 'unsubscribe' verb of the platform-info API for monitoring devices +_AFT.testVerbStatusSuccess(testPrefix.."unsubscribe", "platform-info", "unsubscribe", {event=ev_mon_arg}) --- This tests the 'unsubscribe' verb of the platform-info API -_AFT.testVerbStatusSuccess(testPrefix.."unsubscribe", "platform-info", "unsubscribe", {}) \ No newline at end of file +-- This tests the 'scan' verb of the platform-info API +_AFT.testVerbStatusSuccess(testPrefix.."scan", "platform-info", "scan", {}) \ No newline at end of file -- cgit 1.2.3-korg