Skip to content

Commit

Permalink
add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
parvathika committed Nov 19, 2024
1 parent bde6bbd commit bbd4fc9
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions Tests/unittest/test_connectivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,29 +112,6 @@ TEST_F(ConnectivityMonitorTest, StartMonitor_NotifyIfAlreadyMonitoring) {
bool result = cm.startConnectivityMonitor(interfaceStatus);
EXPECT_TRUE(result);
}
TEST_F(ConnectivityMonitorTest, StartMonitor_MultipleConsecutiveCalls) {
bool interfaceStatus = true;
bool result = cm.startConnectivityMonitor(interfaceStatus); // First call
EXPECT_TRUE(result);

result = cm.startConnectivityMonitor(interfaceStatus); // Second call
EXPECT_TRUE(result);

result = cm.startConnectivityMonitor(interfaceStatus); // Third call
EXPECT_TRUE(result);

// Ensure no issues with repeated calls
EXPECT_TRUE(connectivityMonitorThrd.joinable()); // The thread should be valid
}
TEST_F(ConnectivityMonitorTest, StartMonitor_InitialStateSetToUnknown) {
bool interfaceStatus = true;
cm.startConnectivityMonitor(interfaceStatus);
EXPECT_EQ(gInternetState, UNKNOWN);
EXPECT_EQ(gIpv4InternetState, UNKNOWN);
EXPECT_EQ(gIpv6InternetState, UNKNOWN);
}



TEST_F(ConnectivityMonitorTest, SetEndpoints_Valid) {
std::vector<std::string> endpoints = {"https://github.com/rdkcentral", "https://github.com/rdkcentral/rdkservices"};
Expand Down

0 comments on commit bbd4fc9

Please sign in to comment.