diff options
author | Yaroslav Mamykin (GitHub) <33784535+YarikMamykin@users.noreply.github.com> | 2019-09-13 17:48:27 +0300 |
---|---|---|
committer | Collin <iCollin@users.noreply.github.com> | 2019-09-13 10:48:27 -0400 |
commit | 73b34832829650834ea69b3606ce8127a93ef973 (patch) | |
tree | 9811316847450972ae3d70cf6460e35637eff671 /src/components/application_manager/rpc_plugins | |
parent | 81f621bb92e4a2065830bb54523a9b73ea993b2b (diff) | |
download | sdl_core-73b34832829650834ea69b3606ce8127a93ef973.tar.gz |
Fix sdl versioning for vehicle data (#3015)
* Fix versioning appliance for vehicle data
SDL applied SyncMsgVersion=4.5.1 in case mobile app version was < 5.0
With this commit SDL applies SyncMsgVersion respectively to mobile app
* Add unit test
* Fix existing unit tests
* fixup! Fix existing unit tests
* fixup! Fix versioning appliance for vehicle data
* fixup! Fix versioning appliance for vehicle data
* fixup! Add unit test
* fixup! Fix existing unit tests
* fixup! Add unit test
* fixup! Fix existing unit tests
* fixup! Fix versioning appliance for vehicle data
Diffstat (limited to 'src/components/application_manager/rpc_plugins')
2 files changed, 6 insertions, 8 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc index d44265a1d5..55be43f37b 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc @@ -265,15 +265,17 @@ TEST_F(RCGetInteriorVehicleDataConsentTest, TEST_F(RCGetInteriorVehicleDataConsentTest, Run_MobileSendButtonPressMessage_HMISendINUSEModeToMobile) { - // Arrange - auto mobile_message = CreateBasicMessage(); - // Expectations EXPECT_CALL(mock_allocation_manager_, AcquireResource(_, _, _)) .WillOnce(Return(rc_rpc_plugin::AcquireResult::IN_USE)); + auto msg_ver = utils::SemanticVersion(); + ON_CALL(*mock_app_, msg_version()).WillByDefault(ReturnRef(msg_ver)); + EXPECT_CALL(*optional_mock_rpc_plugin, GetCommandFactory()) .WillOnce(ReturnRef(mock_command_factory)); + + auto mobile_message = CreateBasicMessage(); auto rc_consent_response = CreateRCCommand<commands::RCGetInteriorVehicleDataConsentResponse>( mobile_message); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc index c4bc5cb486..4d41f69b49 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc @@ -383,11 +383,7 @@ void RegisterAppInterfaceRequest::Run() { // Version negotiation utils::SemanticVersion module_version( major_version, minor_version, patch_version); - if (mobile_version < utils::rpc_version_5) { - // Mobile versioning did not exist for - // versions before 5.0 - application->set_msg_version(utils::base_rpc_version); - } else if (mobile_version < module_version) { + if (mobile_version < module_version) { // Use mobile RPC version as negotiated version application->set_msg_version(mobile_version); } else { |