summaryrefslogtreecommitdiffstats
path: root/test/afb-test/tests/low-can_BasicAPITest.lua
diff options
context:
space:
mode:
authorArthur Guyader <arthur.guyader@iot.bzh>2019-07-29 15:20:32 +0200
committerArthur Guyader <arthur.guyader@iot.bzh>2019-08-12 15:06:45 +0200
commit3adf3c20f481865ac513df5483df788d1553f606 (patch)
treea08d630ecdb10acb89222ab9c6004fbbfdff2687 /test/afb-test/tests/low-can_BasicAPITest.lua
parent22e1fe8db6686ee6ae32cfe58a10aad9f7dfb3a7 (diff)
Add tests for J1939 features.
This commit adds tests for the J1939 features. Bug-AGL: SPEC-2386 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: I2545eb2f9a27561714fc5efcbd885afcb237770d
Diffstat (limited to 'test/afb-test/tests/low-can_BasicAPITest.lua')
-rw-r--r--test/afb-test/tests/low-can_BasicAPITest.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/afb-test/tests/low-can_BasicAPITest.lua b/test/afb-test/tests/low-can_BasicAPITest.lua
index bebf057a..2076d878 100644
--- a/test/afb-test/tests/low-can_BasicAPITest.lua
+++ b/test/afb-test/tests/low-can_BasicAPITest.lua
@@ -19,6 +19,10 @@
NOTE: strict mode: every global variables should be prefixed by '_'
--]]
+print("\n##########################################")
+print("######### BEGIN BASIC TESTS #########")
+print("##########################################\n")
+
_AFT.setBeforeAll(function()
local can = io.open("/sys/class/net/can0")
if can == nil then
@@ -44,7 +48,7 @@ _AFT.testVerbStatusSuccess("low-can_auth", "low-can", "auth", {})
_AFT.testVerbStatusSuccess("low-can_write", "low-can", "write", { signal_name = "hvac.temperature.left", signal_value = 21})
_AFT.testVerbStatusSuccess("low-can_write_raw", "low-can", "write", { bus_name= "hs", frame= { can_id= 1568, can_dlc=8, can_data= {255,255,255,255,255,255,255,255}}})
-_AFT.testVerbStatusError("low-can_write_unwritable_signal", "low-can", "write", { signal_name = "engine.speed", signal_value = 1234})
+_AFT.testVerbStatusError("low-can_write_unwritable_signal", "low-can", "write", { signal_name = "vehicle.average.speed", signal_value = 1234})
_AFT.testVerbStatusError("low-can_write_wrong_name_key", "low-can", "write", { name = "hvac.temperature.left", signal_value = 21})
_AFT.testVerbStatusError("low-can_write_wrong_value_key", "low-can", "write", { signal_name = "hvac.temperature.left", value = 21})
_AFT.testVerbStatusError("low-can_write_raw_invalid_bus_key", "low-can", "write", { bus= "hs", frame= { can_id= 1568, can_dlc=8, can_data= {255,255,255,255,255,255,255,255}}})