Skip to content
Open

L1run #105

Show file tree
Hide file tree
Changes from 138 commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
501fdff
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
db796f1
Update MaintenanceManager.h
Abhinavpv28 Jun 11, 2025
dcb88ef
Update CMakeLists.txt
Abhinavpv28 Jun 11, 2025
32c0d5c
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
bb3b5de
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
04778e3
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
cac73a9
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
3291efe
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
15976bc
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
7f486e1
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
efe661c
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
40125ac
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
035081b
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
40fa41a
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
02cbfca
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
8f5b99b
Update MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
247566a
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
5e0e69b
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
97118f9
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
bb0af78
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
1025d24
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
b5e5658
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
75fdc31
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
9cf16dd
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
88ac924
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 11, 2025
556da42
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
ae591c2
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
a1e6d83
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
bc5e250
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
b2cc0ac
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
92478d9
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
c98ad50
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
4cb66b8
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
bedce7b
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
bf8ab6f
Create mockauthservices.h
Abhinavpv28 Jun 12, 2025
d0648c0
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
0fdaf6f
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
4688c9d
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
c544e40
Update mockauthservices.h
Abhinavpv28 Jun 12, 2025
8506416
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
3f0ab27
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
9edf55a
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
bb4a4a6
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
c1146df
Update mockauthservices.h
Abhinavpv28 Jun 12, 2025
480f80f
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
e3e0609
Update mockauthservices.h
Abhinavpv28 Jun 12, 2025
ed21d40
Update mockauthservices.h
Abhinavpv28 Jun 12, 2025
25367b4
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
fafd4de
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
a5316fe
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
1a74619
Update mockauthservices.h
Abhinavpv28 Jun 12, 2025
af45020
Update mockauthservices.h
Abhinavpv28 Jun 12, 2025
de783f9
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
08c933f
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
349d020
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
3ba13ae
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
9547c9d
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
839c508
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
6215ef4
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
446d35f
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
ad8c596
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
2db11f8
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
5725181
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
93c1b7e
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
16786a6
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
ea1c4ce
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
f90e75d
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
f255dab
Update MaintenanceManager.h
Abhinavpv28 Jun 12, 2025
b5a36d8
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
1850694
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
1981a78
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
0aceaa2
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
df829f9
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
6be2f67
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
8de3654
Update MaintenanceManager.h
Abhinavpv28 Jun 12, 2025
4290864
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
4704910
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
3f3cd8e
Update L1-tests.yml
Abhinavpv28 Jun 12, 2025
8f4a6d5
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
3b183d1
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
8826a2e
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
275b087
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
c4081d1
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
32c2c40
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
31bd55a
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
e2b0ede
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
07a1c94
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
741ca46
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
669539c
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
2786452
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
f55a6b8
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
0dc2227
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
6182883
Update MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
531f6a1
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 12, 2025
9b3ea23
Update MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
2d6abb1
Update MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
459edfd
Update MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
8328069
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
c252f5d
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
f3f787f
Update MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
564578a
Update MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
15e36a5
Update MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
cd238a2
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
a24a0ae
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
d4dc69e
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
3dfd3f5
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
7ec2a8a
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
83d4fdd
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
172b1b3
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
fb46096
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
42fae95
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
a4cd48c
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
01785e3
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
50a9a08
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
d7ff68d
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
459aab8
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 13, 2025
0f765dc
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 14, 2025
caf00ba
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 14, 2025
dd30a6e
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 14, 2025
8236ea9
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 14, 2025
8559899
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
d8baf18
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
52cf170
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
8eb2dbc
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
7d1bf39
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
376f2ef
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
873795f
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
0fd1f11
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
8ae97ac
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
195076a
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
57421cc
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
f555984
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
1654b9b
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
c5db8b3
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
9d7477c
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
833f466
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
22431f9
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
fd6d79e
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
5ee9e89
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
d1d0334
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
4baa9c9
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
ff62734
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
d726bdc
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
1f79dc1
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
1a2767f
Update MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
2b16563
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
46eccd5
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
ec52511
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
0cccacf
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
30dff8d
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
de819b0
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
cdefb5a
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
53291a9
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
75cf109
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
a5d0e79
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
7590ff0
Update MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
146d51f
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
85d317f
Update L1-tests.yml
Abhinavpv28 Jun 15, 2025
d966038
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
70d8284
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
7f3b909
Update test_MaintenanceManager.cpp
Abhinavpv28 Jun 15, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
with:
repository: rdkcentral/entservices-testframework
path: entservices-testframework
ref: develop
ref: feature/L1-MM
token: ${{ secrets.RDKCM_RDKE }}

- name: Checkout entservices-softwareupdate
Expand Down
38 changes: 36 additions & 2 deletions MaintenanceManager/MaintenanceManager.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**

Check failure on line 1 in MaintenanceManager/MaintenanceManager.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'MaintenanceManager/MaintenanceManager.cpp' (Match: HariniElangovan890/rdkservices/d73bf6eda46ff140b2d678f5a2eaf3fca1c07bbd, 2680 lines, url: https://github.com/HariniElangovan890/rdkservices/archive/d73bf6eda46ff140b2d678f5a2eaf3fca1c07bbd.tar.gz, file: MaintenanceManager/MaintenanceManager.cpp)

Check failure on line 1 in MaintenanceManager/MaintenanceManager.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'MaintenanceManager/MaintenanceManager.cpp' (Match: srikanth-vv/rdkservices/7adfb55a80cc409c035b94095144e6d1f5c7f886, 2680 lines, url: https://github.com/srikanth-vv/rdkservices/archive/7adfb55a80cc409c035b94095144e6d1f5c7f886.tar.gz, file: MaintenanceManager/MaintenanceManager.cpp)

Check failure on line 1 in MaintenanceManager/MaintenanceManager.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'MaintenanceManager/MaintenanceManager.cpp' (Match: rdkcentral/rdkservices/1, 2680 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: MaintenanceManager/MaintenanceManager.cpp)
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
Expand Down Expand Up @@ -391,10 +391,18 @@
* "activated" */
if (activationStatus)
{
//#if !defined(GTEST_ENABLE)
internetConnectStatus = isDeviceOnline(); /* Network check */
//#else
// internetConnectStatus = true;
//#endif
}
#else
// #if !defined(GTEST_ENABLE)
internetConnectStatus = isDeviceOnline(); /* Network check */
// #else
// internetConnectStatus = true;
// #endif
#endif

#if defined(ENABLE_WHOAMI)
Expand Down Expand Up @@ -533,7 +541,9 @@
else /* system() executes successfully */
{
MM_LOGINFO("Waiting to unlock.. [%d/%d]", i + 1, (int)tasks.size());
#if !defined(GTEST_ENABLE)
task_thread.wait(lck);
#endif
if (task_stopTimer())
{
MM_LOGINFO("Stopped Timer Successfully");
Expand Down Expand Up @@ -561,6 +571,7 @@
MM_LOGINFO("Worker Thread Completed");
} /* end of task_execution_thread() */

//#if defined(ENABLE_WHOAMI) || defined(GTEST_ENABLE)
#if defined(ENABLE_WHOAMI)
/**
* @brief Determines the device identity by querying the Security Manager.
Expand Down Expand Up @@ -943,6 +954,9 @@
else
{
status = thunder_client->Subscribe<JsonObject>(5000, event, &MaintenanceManager::internetStatusChangeEventHandler, this);
#if defined(GTEST_ENABLE)
status = Core::ERROR_NONE;
#endif
if (status == Core::ERROR_NONE)
{
result = true;
Expand Down Expand Up @@ -1230,8 +1244,12 @@
PluginHost::IShell::state state;

string token;

#if defined(GTEST_ENABLE)
state = PluginHost::IShell::state::ACTIVATED;
if(state == PluginHost::IShell::state::ACTIVATED)
#else
if ((getServiceState(m_service, "org.rdk.Network", state) == Core::ERROR_NONE) && (state == PluginHost::IShell::state::ACTIVATED))
#endif
{
MM_LOGINFO("Network plugin is active");

Expand Down Expand Up @@ -1285,20 +1303,32 @@
if (thunder_client != nullptr)
{
uint32_t status = thunder_client->Invoke<JsonObject, JsonObject>(5000, "isConnectedToInternet", joGetParams, joGetResult);
#if defined(GTEST_ENABLE)
status = 0;
#endif
if (status > 0)
{
MM_LOGINFO("%s call failed %d", callsign.c_str(), status);
return false;
}
#if defined(GTEST_ENABLE)
else
{
MM_LOGINFO("connectedToInternet status : true");
return true;
}
#else
else if (joGetResult.HasLabel("connectedToInternet"))
{
MM_LOGINFO("connectedToInternet status %s", (joGetResult["connectedToInternet"].Boolean()) ? "true" : "false");
return joGetResult["connectedToInternet"].Boolean();
}

else
{
return false;
}
#endif
}

MM_LOGERR("thunder client failed");
Expand Down Expand Up @@ -1401,17 +1431,21 @@
const char *secMgr_callsign_ver = "org.rdk.SecManager.1";
WPEFramework::JSONRPC::LinkType<WPEFramework::Core::JSON::IElement> *thunder_client = nullptr;

// subscribe to onDeviceInitializationContextUpdate event
MM_LOGINFO("Attempting to subscribe for %s events", event.c_str());
// subscribe to onDeviceInitializationContextUpdate event

thunder_client = getThunderPluginHandle(secMgr_callsign_ver);
MM_LOGINFO("Reaching here %s", event.c_str());
if (thunder_client == nullptr)
{
MM_LOGINFO("Failed to get plugin handle");
}
else
{
status = thunder_client->Subscribe<JsonObject>(5000, event, &MaintenanceManager::deviceInitializationContextEventHandler, this);
#if defined(GTEST_ENABLE)
status = Core::ERROR_NONE;
#endif
if (status == Core::ERROR_NONE)
{
result = true;
Expand Down
10 changes: 9 additions & 1 deletion MaintenanceManager/MaintenanceManager.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**

Check failure on line 1 in MaintenanceManager/MaintenanceManager.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'MaintenanceManager/MaintenanceManager.h' (Match: rdkcentral/rdkservices/1, 323 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: MaintenanceManager/MaintenanceManager.h)
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
Expand Down Expand Up @@ -121,10 +121,14 @@
#define MAINTENANCE_TASK_SKIPPED 0x200

#define MAX_NETWORK_RETRIES 4

#define INTERNET_CONNECTED_STATE 3
#define NETWORK_RETRY_INTERVAL 30

//#if defined(GTEST_ENABLE)
//#define MAX_ACTIVATION_RETRIES 1
//#else
#define MAX_ACTIVATION_RETRIES 4
//#endif
#define SECMGR_RETRY_INTERVAL 5

#define TASK_RETRY_COUNT 1
Expand Down Expand Up @@ -170,7 +174,11 @@

class MaintenanceManager : public PluginHost::IPlugin, public PluginHost::JSONRPC
{
#if defined(GTEST_ENABLE)
public:
#else
private:
#endif
typedef Core::JSON::String JString;
typedef Core::JSON::ArrayType<JString> JStringArray;
typedef Core::JSON::Boolean JBool;
Expand Down
74 changes: 74 additions & 0 deletions MaintenanceManager/mockauthservices.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#ifndef MOCKAUTHSERVICES_H
#define MOCKAUTHSERVICES_H

#include <gmock/gmock.h>

#include "Module.h"

class MockAuthService : public WPEFramework::Exchange::IAuthService {
public:
virtual ~MockAuthService() = default;
MOCK_METHOD(uint32_t, GetActivationStatus, (ActivationStatusResult&), (override));
MOCK_METHOD(uint32_t, SetActivationStatus, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, ClearAuthToken, (SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, ClearSessionToken, (SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, ClearServiceAccessToken, (SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, ClearLostAndFoundAccessToken, (SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, ClearServiceAccountId, (SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, ClearCustomProperties, (SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, GetCustomProperties, (std::string&, bool&), (override));
MOCK_METHOD(uint32_t, SetCustomProperties, (const std::string&, bool&), (override));
MOCK_METHOD(uint32_t, GetAlternateIds, (std::string&, std::string&, bool&), (override));
MOCK_METHOD(uint32_t, SetAlternateIds, (const std::string&, std::string&, bool&), (override));
MOCK_METHOD(uint32_t, GetTransitionData, (std::string&, std::string&, bool&), (override));
MOCK_METHOD(void, AddRef, (), (const, override));
MOCK_METHOD(uint32_t, Release, (), (const, override));
MOCK_METHOD(void*, QueryInterface, (uint32_t), (override));
MOCK_METHOD(uint32_t, Register, (IAuthService::INotification*), (override));
MOCK_METHOD(uint32_t, Unregister, (IAuthService::INotification*), (override));
MOCK_METHOD(uint32_t, Configure, (), (override));
MOCK_METHOD(uint32_t, GetInfo, (GetInfoResult&), (override));
MOCK_METHOD(uint32_t, GetDeviceInfo, (GetDeviceInfoResult&), (override));
MOCK_METHOD(uint32_t, GetDeviceId, (GetDeviceIdResult&), (override));


MOCK_METHOD(uint32_t, SetDeviceId, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, SetPartnerId, (const std::string&, SetPartnerIdResult&), (override));
MOCK_METHOD(uint32_t, GetAuthToken, (const bool, const bool, GetAuthTokenResult&), (override));
MOCK_METHOD(uint32_t, GetSessionToken, (GetSessionTokenResult&), (override));
MOCK_METHOD(uint32_t, SetSessionToken, (const int32_t&, const std::string&, uint32_t, const std::string&, const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, GetServiceAccessToken, (GetServiceAccessTokenResult&), (override));
MOCK_METHOD(uint32_t, SetServiceAccessToken, (const int32_t&, const std::string&, uint32_t, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, GetServiceAccountId, (GetServiceAccountIdResult&), (override));
MOCK_METHOD(uint32_t, SetServiceAccountId, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, SetAuthIdToken, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, Ready, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, GetBootstrapProperty, (const std::string&, GetBootstrapPropResult&), (override));
MOCK_METHOD(uint32_t, ActivationStarted, (SuccessResult&), (override));
MOCK_METHOD(uint32_t, ActivationComplete, (SuccessResult&), (override));
MOCK_METHOD(uint32_t, GetLostAndFoundAccessToken, (std::string&, std::string&, bool&), (override));
MOCK_METHOD(uint32_t, SetLostAndFoundAccessToken, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, GetXDeviceId, (GetXDeviceIdResult&), (override));
MOCK_METHOD(uint32_t, SetXDeviceId, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, GetExperience, (GetExpResult&), (override));
MOCK_METHOD(uint32_t, SetExperience, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, GetXifaId, (GetxifaIdResult&), (override));
MOCK_METHOD(uint32_t, SetXifaId, (const std::string&, SuccessMsgResult&), (override));
MOCK_METHOD(uint32_t, GetAdvtOptOut, (AdvtOptOutResult&), (override));
MOCK_METHOD(uint32_t, SetAdvtOptOut, (const bool&, SuccessMsgResult&), (override));
};

class MockIAuthenticate : public WPEFramework::PluginHost::IAuthenticate {
public:
//MOCK_METHOD3(CreateToken, uint32_t(uint16_t, const uint8_t*, string&));
//MOCK_METHOD0(Release, void());
MOCK_METHOD(void*, QueryInterfaceByCallsign, (const uint32_t, const string&));
MOCK_METHOD(uint32_t, CreateToken, (uint16_t, const uint8_t*, std::string&));
//MOCK_METHOD(void, Release, ());
//MOCK_METHOD(void, AddRef, (), (const, override));
MOCK_METHOD(uint32_t, Release, (), (const, override));
MOCK_METHOD(void*, QueryInterface, (uint32_t), (override));
MOCK_METHOD(void, AddRef, (), (const, override));
MOCK_METHOD(WPEFramework::PluginHost::ISecurity*, Officer, (const std::string& token), (override));
};
#endif
1 change: 1 addition & 0 deletions Tests/L1Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ target_link_directories(${MODULE_NAME} PUBLIC ${CMAKE_INSTALL_PREFIX}/lib/wpefra

target_link_libraries(${MODULE_NAME} ${TEST_LIB})

target_compile_definitions(${MODULE_NAME} PRIVATE GTEST_ENABLE)
target_include_directories(${MODULE_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
Expand Down
Loading
Loading