Skip to content

Commit

Permalink
Merge pull request #5324 from sborushevsky/RDKTV-30706_main
Browse files Browse the repository at this point in the history
RDKTV-30706 : Added L1 test for case when settings.conf is a directory.
  • Loading branch information
anand-ky authored May 23, 2024
2 parents 047d458 + 5f65438 commit 70c8049
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Tests/L1Tests/tests/test_SystemServices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6086,3 +6086,26 @@ TEST_F(SystemServicesEventIarmTest, onLogUploadFailed_whenUploadLogScriptNotRunn
}
/*Test cases for onLogUpload ends here*/

class SystemServicesEmptyTest : public ::testing::Test {
};

/**
* @brief Test case for SystemServices constructor when /opt/system_service_settings.conf is the directory.
*
* Verifies if constructor doesn't hang if /opt/system_service_settings.conf is not a regular file.
*
* @param None.
* @return None.
*/

TEST_F(SystemServicesEmptyTest, system_service_settings_conf_as_dir)
{
Core::File(string("/opt/system_service_settings.conf")).Destroy();

EXPECT_TRUE(Core::Directory("/opt/system_service_settings.conf").CreatePath());

Core::ProxyType<Plugin::SystemServices> plugin;
plugin = Core::ProxyType<Plugin::SystemServices>::Create();

EXPECT_TRUE(Core::Directory("/opt/system_service_settings.conf").Destroy(true));
}

0 comments on commit 70c8049

Please sign in to comment.