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

PolicyTableUpdate must be triggered in case no "certificate" exist at "module_config" section of PolicyTable #1783

Merged

Conversation

dboltovskyi
Copy link
Contributor

@dboltovskyi dboltovskyi commented Dec 25, 2017

This PR implements test scripts for the following issues:

In order to run scripts specific version of ATF from PR #107 has to be used
Fix for SDL Core is in PR #1971

@dboltovskyi dboltovskyi force-pushed the feature/ptu_certificate branch from 7fc9187 to 34ee062 Compare December 26, 2017 15:07
runner.SetParameters({ isSelfIncluded = false })
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Set ForceProtectedService OFF", common.setForceProtectedServiceParam, { "0x0A" })
Copy link
Contributor

Choose a reason for hiding this comment

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

Set ForceProtectedService ON

Copy link
Contributor Author

Choose a reason for hiding this comment

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

runner.SetParameters({ isSelfIncluded = false })
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Set ForceProtectedService OFF", common.setForceProtectedServiceParam, { "0x0B" })
Copy link
Contributor

Choose a reason for hiding this comment

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

Set ForceProtectedService ON

Copy link
Contributor Author

Choose a reason for hiding this comment

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

end

local function expNotificationFunc()
common.getHMIConnection():ExpectNotification("SDL.OnStatusUpdate",
Copy link
Contributor

Choose a reason for hiding this comment

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

Expectation is not triggered during script execution.

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 Already fixed in last commit ea0f87c


runner.Title("Test")
runner.Step("Register App", common.registerApp)
runner.Step("PolicyTableUpdate fails", common.policyTableUpdate, { ptUpdate, expNotificationFunc })
Copy link
Contributor

Choose a reason for hiding this comment

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

PolicyTableUpdate fails -> test case is provided successful PolicyTableUpdate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

config.application2.registerAppInterfaceParams.appHMIType = { appHMIType[2] }

--[[ Local Functions ]]
local function ptUpdate(pTbl)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add pTbl.policy_table.module_config.certificate = nil in ptUpdate to make sure that certificate is absent.

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 Already added in commit ea0f87c

return self.mobile_session_impl:ExpectControlMessage(pServiceId, pData)
end
function pMobSession.mobile_session_impl.control_services:ExpectHandshakeMessage()
-- if not self.session.isSecuredSession then
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove commented code in function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

self.mobile_session_impl.control_services:ExpectHandshakeMessage(service)
:Do(function(e)
local isHandshakeFinished = self.mobile_session_impl.control_services.session.security:isHandshakeFinished()
-- print(e.occurences, isHandshakeFinished)
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

common.getMobileSession():ExpectHandshakeMessage()
:Times(handshakeOccurences)

common.delayedExp()
Copy link
Contributor

Choose a reason for hiding this comment

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

@dboltovskyi I would propose to set delay time explicitly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aderiabin If the value of timeout is not defined default one (2000 ms) is used

@@ -5,9 +5,11 @@ local commonFunctions = require('user_modules/shared_testcases/commonFunctions')

local isInitialStep = true
local isPrintTitle = false
local isSelfIncluded = true
Copy link
Contributor

Choose a reason for hiding this comment

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

@dboltovskyi I would propose to add isSelfIncluded flag into runner.testSettings table instead, because the flag is a part of settings of current test, not runner.

Also function runner.SetParameters is redundant if use runner.testSettings

Copy link
Contributor Author

@dboltovskyi dboltovskyi Dec 27, 2017

Choose a reason for hiding this comment

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

@aderiabin Accepted. Done in commit 391ab59

@dboltovskyi dboltovskyi force-pushed the feature/ptu_certificate branch from 47a0b02 to 29a323c Compare December 28, 2017 10:24
@dboltovskyi dboltovskyi merged commit cf03f34 into smartdevicelink:develop Dec 28, 2017
# 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.

3 participants