Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add script to verify 1885 issue #2303

Closed
wants to merge 3 commits into from

Conversation

HSavynetska
Copy link
Contributor

ATF Test Scripts to check #1885

This PR is ready for review.

Summary

A test script has been added to verify that the problem has been fixed.

ATF version

develop

CLA

-- SDL must cut off <unknown_parameter> or <unknown_RPC> continue validating received PTU without <unknown_parameter> or
-- <unknown_RPC> merge valid Updated PT without <unknown_parameter> or <unknown_RPC> with LocalPT in case
-- of no other failures
-- Actual result:N/A
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual result is redundant for script

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina You can find the updates in the commit 93cd00c

runner.testSettings.isSelfIncluded = false

--[[ Local variables ]]
-- set default parameters for 'SendLocation' RPC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need params for Sendlocation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina , These params are necessary for successful SendLocation RPC processing after PTU with unknown RPC


runner.Title("Test")
runner.Step("PTU update with unknown API", common.policyTableUpdate, { ptuUpdateFuncRPC })
runner.Step("Check applying of PT by processing SendLocation", SuccessfulProcessingRPC,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why SendLocation RPC should be processed in case this RPC is not present in permissions update?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina, To verify that SDL cut off unknown RPC from PTU and that SendLocation RPC can be processed after PTU if it is present in permissions update

local function SuccessfulProcessingRPC(RPC, params, interface)
local cid = common.getMobileSession():SendRPC(RPC, params)
common.getHMIConnection():ExpectRequest(interface .. "." .. RPC, params)
-- :Do(function(_,data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove commented code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina You can find the updates in the commit 93cd00c

if RPC == "GetVehicleData" then
common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {gps = gpsResponse})
elseif
RPC == "SubscribeVehicleData" then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this code here? There is no successful processing of SubscribeVehicleData

Copy link
Contributor Author

@HSavynetska HSavynetska Jan 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina You can find the updates in the commit d3bc0cd

--! self - test object
--! @return: none
--]]
local function DisallowedRPC(RPC, params, interface)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is used for only one RPC, so can be specified only for SubscribeVehicleData

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina You can find the updates in the commit 93cd00c

--! RPC - RPC name
--! params - RPC params for mobile request
--! interface - interface of RPC on HMI
--! self - test object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have self here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina You can find the updates in the commit 93cd00c. self was deleted

--! RPC - RPC name
--! params - RPC params for mobile request
--! interface - interface of RPC on HMI
--! self - test object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have self here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina You can find the updates in the commit 93cd00c

runner.Step("Check applying of PT by processing GetVehicleData", SuccessfulProcessingRPC,
{ "GetVehicleData", { gps = true }, "VehicleInfo" })
runner.Step("Check applying of PT by processing SubscribeVehicleData", DisallowedRPC,
{ "SubscribeVehicleData", { gps = true }, "VehicleInfo" })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about checks for items ( unknown RPC and parameter ) in LPT or snapshot?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetmanetsIrina You can find the updates in the commit 93cd00c

@ShobhitAd ShobhitAd closed this Apr 14, 2021
@ShobhitAd ShobhitAd deleted the branch smartdevicelink:develop April 14, 2021 16:06
@dboltovskyi
Copy link
Contributor

The internal review iteration has been moved to the LuxoftSDL.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants