Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0182-audio-source-am-fm-xm.md
-- User story: TBD
-- Use case: TBD
--
-- Requirement summary:TBD
--
-- Description:
-- In case:
Expand All @@ -15,7 +11,7 @@
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local common = require('test_scripts/API/VehicleData/commonVehicleData')
local common = require('test_scripts/API/VehicleData/common')

--[[ Local Variables ]]
local audioSources = {
Expand Down Expand Up @@ -74,8 +70,6 @@ common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
common.Step("RAI", common.registerApp)
common.Step("PTU", common.policyTableUpdate, { common.ptUpdate })
common.Step("Activate App", common.activateApp)

common.Title("Test")
for _, source in pairs(audioSources) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0182-audio-source-am-fm-xm.md
-- User story: TBD
-- Use case: TBD
--
-- Requirement summary:TBD
--
-- Description:
-- In case:
Expand All @@ -14,7 +10,7 @@
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local common = require('test_scripts/API/VehicleData/commonVehicleData')
local common = require('test_scripts/API/VehicleData/common')

--[[ Local Variables ]]
local audioSources = {
Expand Down Expand Up @@ -90,8 +86,6 @@ common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
common.Step("RAI", common.registerApp)
common.Step("PTU", common.policyTableUpdate, { common.ptUpdate })
common.Step("Activate App", common.activateApp)

common.Title("Test")
common.Step("RPC " .. rpc1.name, processRPCSubscribeSuccess)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ local function VehicleDataItemsWithDataTableCreation()
common.VehicleDataItemsWithData.vin.APItype = "VEHICLEDATA_VIN"
common.VehicleDataItemsWithData.prndl.value = "PARK"
common.VehicleDataItemsWithData.prndl.APItype = "VEHICLEDATA_PRNDL"
common.VehicleDataItemsWithData.handsOffSteering.value = true
common.VehicleDataItemsWithData.handsOffSteering.APItype = "VEHICLEDATA_HANDSOFFSTEERING"
local tirePressureParams = common.VehicleDataItemsWithData.tirePressure.params
tirePressureParams.pressureTelltale.value = "OFF"
local leftFrontParams = tirePressureParams.leftFront.params
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---------------------------------------------------------------------------------------------------
-- Description: Check that SDL processes GetVehicleData RPC with <vd_param> parameter
--
-- Preconditions:
-- 1) SDL and HMI are started
-- 2) GetVehicleData RPC and <vd_param> parameter are allowed by policies
-- 3) App is registered
--
-- In case:
-- 1) App sends valid GetVehicleData(<vd_param>=true) request to SDL
-- SDL does:
-- - a) transfer this request to HMI
-- 2) HMI sends VI.GetVehicleData response with <vd_param> data to SDL
-- SDL does:
-- - a) send GetVehicleData response with (success = true, resultCode = "SUCCESS",
-- <vd_param> = <data received from HMI>) to App
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local common = require('test_scripts/API/VehicleData/common')

--[[ Scenario ]]
common.Title("Preconditions")
common.Step("Clean environment and update preloaded_pt file", common.preconditions)
common.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
common.Step("Register App", common.registerApp)

common.Title("Test")
for param in common.spairs(common.getVDParams()) do
common.Title("VD parameter: " .. param)
common.Step("RPC " .. common.rpc.get, common.getVehicleData, { param })
end

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
56 changes: 0 additions & 56 deletions test_scripts/API/VehicleData/GetVehicleData/001_Success_flow.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---------------------------------------------------------------------------------------------------
-- Description: Check that SDL rejects GetVehicleData request with resultCode "DISALLOWED"
-- if <vd_param> parameter is not allowed by policy
--
-- Preconditions:
-- 1) SDL and HMI are started
-- 2) <vd_param> parameter is not allowed by policies
-- 3) App is registered
--
-- In case:
-- 1) App sends valid GetVehicleData(<vd_param>=true) request to SDL
-- SDL does:
-- - a) send GetVehicleData response with (success = false, resultCode = "DISALLOWED") to App
-- - b) not transfer this request to HMI
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local common = require('test_scripts/API/VehicleData/common')

--[[ Local Variables ]]
local result = "DISALLOWED"

--[[ Local Functions ]]
local function getVDGroup(pDisallowedParam)
local params = {}
for param in pairs(common.getVDParams()) do
if param ~= pDisallowedParam then table.insert(params, param) end
end
return {
rpcs = {
[common.rpc.get] = {
hmi_levels = { "NONE", "BACKGROUND", "LIMITED", "FULL" },
parameters = params
}
}
}
end

--[[ Scenario ]]
for param in common.spairs(common.getVDParams()) do
common.Title("VD parameter: " .. param)
common.Title("Preconditions")
common.Step("Clean environment and update preloaded_pt file", common.preconditions, { getVDGroup(param) })
common.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
common.Step("Register App", common.registerApp)

common.Title("Test")
common.Step("RPC " .. common.rpc.get .. " DISALLOWED", common.processRPCFailure,
{ common.rpc.get, param, result })

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
end

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---------------------------------------------------------------------------------------------------
-- Description: Check that SDL rejects GetVehicleData request with resultCode "DISALLOWED"
-- if <vd_param> parameter is not allowed by policy after PTU
--
-- Preconditions:
-- 1) SDL and HMI are started
-- 2) GetVehicleData RPC and <vd_param> parameter are allowed by policies
-- 3) App is registered
--
-- In case:
-- 1) App sends valid GetVehicleData(<vd_param>=true) request to SDL
-- SDL does:
-- - a) transfer this request to HMI
-- 2) HMI sends VI.GetVehicleData response with <vd_param> data to SDL
-- SDL does:
-- - a) send GetVehicleData response with (success = true, resultCode = "SUCCESS",
-- <vd_param> = <data received from HMI>) to App
-- 3) PTU is performed with disabling permissions for <vd_param> parameter
-- 4) App sends valid GetVehicleData(<vd_param>=true) request to SDL
-- SDL does:
-- - a) send GetVehicleData response with (success = false, resultCode = "DISALLOWED") to App
-- - b) not transfer this request to HMI
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local common = require('test_scripts/API/VehicleData/common')

--[[ Local Variables ]]
local result = "DISALLOWED"

--[[ Local Function ]]
local function getVDGroup(pDisallowedParam)
local params = {}
for param in pairs(common.getVDParams()) do
if param ~= pDisallowedParam then table.insert(params, param) end
end
return {
rpcs = {
[common.rpc.get] = {
hmi_levels = { "NONE", "BACKGROUND", "LIMITED", "FULL" },
parameters = params
}
}
}
end

local function policyTableUpdate(pDisallowedParam)
local function ptUpdate(pt)
pt.policy_table.functional_groupings["NewTestCaseGroup"] = getVDGroup(pDisallowedParam)
pt.policy_table.app_policies[common.getAppParams().fullAppID].groups = { "Base-4", "NewTestCaseGroup" }
end
common.policyTableUpdate(ptUpdate)
end

--[[ Scenario ]]
for param in common.spairs(common.getVDParams()) do
common.Title("VD parameter: " .. param)
common.Title("Preconditions")
common.Step("Clean environment and update preloaded_pt file", common.preconditions)
common.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
common.Step("Register App", common.registerApp)
common.Step("RPC GetVehicleData, SUCCESS", common.getVehicleData, { param })

common.Title("Test")
common.Step("PTU with disabling permissions for VD parameter", policyTableUpdate, { param })
common.Step("RPC " .. common.rpc.get .. " DISALLOWED after PTU", common.processRPCFailure,
{ common.rpc.get, param, result })

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
end
Loading