aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi, Xiaoming <lixm.fnst@cn.fujitsu.com>2020-08-06 15:10:11 +0800
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>2020-08-06 07:21:44 +0000
commitcbd449dfa746c1486a05be7891bc447f36c5271f (patch)
treef1ebb9178b621722fa440cb0bdd57041b5551b7a
parenta7ea36a2a8ecb1c10ce7b64f29607b48d122129b (diff)
fix(network.lua): introduce several missing verb testjellyfish_9.99.4jellyfish_9.99.3jellyfish/9.99.4jellyfish/9.99.39.99.49.99.3
This patch will do two things: - Add the missing verb in the test lua files, part of them are commented as they need extra code to run; - Remove TEST-README.md, which includes description of test wgt and reasons of the lost test verb. This file is not required now. Bug-AGL: SPEC-3458 Change-Id: I081a86605b4f2ace3d20e837826688b2db344af0 Signed-off-by: Li, Xiaoming <lixm.fnst@cn.fujitsu.com>
-rw-r--r--test/TEST-README.md30
-rw-r--r--test/afb-test/tests/network.lua20
2 files changed, 20 insertions, 30 deletions
diff --git a/test/TEST-README.md b/test/TEST-README.md
deleted file mode 100644
index b2475ae..0000000
--- a/test/TEST-README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-## Building the test widgets
-1. Source the SDK environment script
-2. Create a build directory
-3. Configure and build the project
-
-```
-mkdir build
-cd build
-cmake .. -DBUILD_TEST_WGT=TRUE
-make
-make widget
-
-```
-Note: If you omit the -DBUILD_TEST_WGT=TRUE parameter for cmake,
-you'll have to type `make test_widget` to compile the test widget.
-
-This should produce two _.wgt_ files - one with the service
-and one with the tests within the build directory.
-
-Run the tests:
-```
-scp *.wgt root@<board-ip>:~
-ssh root@<board-ip>
-afm-test $(ls *test.wgt)
-
-```
-
-network.lua is testing just part of the verbs presented in the agl-service-network.
-Proper testing of wifi, bluetooth and ethernet require known enviroment,
-this is the reason why some of the vers are not tested.
diff --git a/test/afb-test/tests/network.lua b/test/afb-test/tests/network.lua
index 2aebe23..df74c6c 100644
--- a/test/afb-test/tests/network.lua
+++ b/test/afb-test/tests/network.lua
@@ -47,6 +47,26 @@ _AFT.testVerbStatusSuccess('testEnableTechnologySuccess','network-manager', 'ena
_AFT.testVerbStatusSuccess('testDisableTechnologySuccess','network-manager','disable_technology', {technology="bluetooth"})
_AFT.testVerbStatusSuccess('testEnableTechnologySuccess','network-manager', 'enable_technology', {technology="bluetooth"})
+
+-- Test get_property
_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','get_property', {technology="wifi"})
_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','get_property', {technology="ethernet"})
_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','get_property', {technology="bluetooth"})
+
+-- Test set_property
+_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','set_property', {technology="ethernet",tethering="true"}
+_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','set_property', {technology="ethernet",tethering="false"}
+_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','set_property', {technology="wifi",tethering="true"}
+_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','set_property', {technology="wifi",tethering="false"}
+_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','set_property', {technology="bluetooth",tethering="true"}
+_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','set_property', {technology="bluetooth",tethering="false"}
+
+_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','scan_services', {technology="wifi"})
+
+--_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','connect_service', {service="wifi_ec086b181ee3_436861726c6f74746520262043686c6f65_managed_psk"}
+
+--_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','disconnect_service', {service="wifi_ec086b181ee3_436861726c6f74746520262043686c6f65_managed_psk"}
+
+--_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','remove_service', {service="wifi_ec086b181ee3_436861726c6f74746520262043686c6f65_managed_psk"}
+
+--_AFT.testVerbStatusSuccess('testgetpropertySuccess','network-manager','agent_response', {passphrase="hunter2", id=1}