clang-tidy: enable clang-tidy

Enable the first check: readability-identifier-naming

Also fixed all check failures.

Tested:
1. compiles, no clang-tidy failures
2. the two daemons work correctly on hardware regarding DBus APIs

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ic415e857726e8f521c1d61a3e7f0c85121c0d284
diff --git a/test/ldap_config_test.cpp b/test/ldap_config_test.cpp
index b687383..c210b84 100644
--- a/test/ldap_config_test.cpp
+++ b/test/ldap_config_test.cpp
@@ -42,18 +42,18 @@
         char tmpldap[] = "/tmp/ldap_test.XXXXXX";
         dir = fs::path(mkdtemp(tmpldap));
         fs::path tlsCacertFilePath{TLS_CACERT_PATH};
-        tlsCacertFile = tlsCacertFilePath.filename().c_str();
+        tlsCACertFile = tlsCacertFilePath.filename().c_str();
         fs::path tlsCertFilePath{TLS_CERT_FILE};
         tlsCertFile = tlsCertFilePath.filename().c_str();
 
         fs::path confFilePath{LDAP_CONFIG_FILE};
-        ldapconfFile = confFilePath.filename().c_str();
+        ldapConfFile = confFilePath.filename().c_str();
         std::fstream fs;
         fs.open(dir / defaultNslcdFile, std::fstream::out);
         fs.close();
         fs.open(dir / nsSwitchFile, std::fstream::out);
         fs.close();
-        fs.open(dir / tlsCacertFile, std::fstream::out);
+        fs.open(dir / tlsCACertFile, std::fstream::out);
         fs.close();
         fs.open(dir / tlsCertFile, std::fstream::out);
         fs.close();
@@ -66,9 +66,9 @@
 
   protected:
     fs::path dir;
-    std::string tlsCacertFile;
+    std::string tlsCACertFile;
     std::string tlsCertFile;
-    std::string ldapconfFile;
+    std::string ldapConfFile;
     sdbusplus::bus_t bus;
 };
 
@@ -118,9 +118,9 @@
 
 TEST_F(TestLDAPConfig, testCreate)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -129,8 +129,8 @@
     }
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
 
     EXPECT_CALL(manager, stopService("nslcd.service")).Times(2);
     EXPECT_CALL(manager, restartService("nslcd.service")).Times(2);
@@ -178,9 +178,9 @@
 
 TEST_F(TestLDAPConfig, testDefaultObject)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -190,8 +190,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
 
     MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
 
     manager.createDefaultObjects();
 
@@ -205,9 +205,9 @@
 
 TEST_F(TestLDAPConfig, testRestoresDefault)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -217,8 +217,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
 
     MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
 
     EXPECT_CALL(manager, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(manager, restartService("nslcd.service")).Times(0);
@@ -238,9 +238,9 @@
 
 TEST_F(TestLDAPConfig, testRestores)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -250,8 +250,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(2);
     EXPECT_CALL(*managerPtr, restartService("nscd.service")).Times(1);
@@ -286,9 +286,9 @@
 
 TEST_F(TestLDAPConfig, testLDAPServerURI)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -298,8 +298,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
 
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(3);
@@ -316,7 +316,7 @@
     EXPECT_EQ(managerPtr->getADConfigPtr()->ldapServerURI(),
               "ldap://9.194.251.139/");
 
-    fs::remove(tlsCacertfile.c_str());
+    fs::remove(tlsCACertFilePath.c_str());
     // Change LDAP Server URI to make it secure
     EXPECT_THROW(
         managerPtr->getADConfigPtr()->ldapServerURI("ldaps://9.194.251.139/"),
@@ -335,9 +335,9 @@
 
 TEST_F(TestLDAPConfig, testLDAPBindDN)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -347,8 +347,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
 
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(3);
@@ -388,9 +388,9 @@
 
 TEST_F(TestLDAPConfig, testLDAPBaseDN)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -400,8 +400,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(3);
     EXPECT_CALL(*managerPtr, restartService("nscd.service")).Times(1);
@@ -438,9 +438,9 @@
 
 TEST_F(TestLDAPConfig, testSearchScope)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -450,8 +450,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(3);
     EXPECT_CALL(*managerPtr, restartService("nscd.service")).Times(1);
@@ -476,9 +476,9 @@
 
 TEST_F(TestLDAPConfig, testLDAPType)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -488,8 +488,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(2);
     EXPECT_CALL(*managerPtr, restartService("nscd.service")).Times(1);
@@ -516,9 +516,9 @@
 
 TEST_F(TestLDAPConfig, testsecureLDAPRestore)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -528,8 +528,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(2);
     EXPECT_CALL(*managerPtr, restartService("nscd.service")).Times(1);
@@ -548,9 +548,9 @@
 
 TEST_F(TestLDAPConfig, filePermission)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -560,8 +560,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(1);
     EXPECT_CALL(*managerPtr, restartService("nscd.service")).Times(1);
@@ -576,7 +576,7 @@
     auto permission =
         fs::perms::owner_read | fs::perms::owner_write | fs::perms::group_read;
     auto persistFilepath = std::string(dir.c_str());
-    persistFilepath += ADDbusObjectPath;
+    persistFilepath += adDbusObjectPath;
     persistFilepath += "/config";
 
     EXPECT_EQ(fs::status(persistFilepath).permissions(), permission);
@@ -585,9 +585,9 @@
 
 TEST_F(TestLDAPConfig, ConditionalEnableConfig)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -597,8 +597,8 @@
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr* managerPtr =
         new MockConfigMgr(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     EXPECT_CALL(*managerPtr, stopService("nslcd.service")).Times(3);
     EXPECT_CALL(*managerPtr, restartService("nslcd.service")).Times(2);
     EXPECT_CALL(*managerPtr, restartService("nscd.service")).Times(2);
@@ -648,9 +648,9 @@
 
 TEST_F(TestLDAPConfig, createPrivMapping)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -659,8 +659,8 @@
     }
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     manager.createDefaultObjects();
     // Create the priv-mapping under the config.
     manager.getADConfigPtr()->create("admin", "priv-admin");
@@ -681,9 +681,9 @@
 
 TEST_F(TestLDAPConfig, deletePrivMapping)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -692,8 +692,8 @@
     }
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     manager.createDefaultObjects();
     // Create the priv-mapping under the config.
     manager.getADConfigPtr()->create("admin", "priv-admin");
@@ -722,9 +722,9 @@
 
 TEST_F(TestLDAPConfig, restorePrivMapping)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -733,8 +733,8 @@
     }
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     manager.createDefaultObjects();
     // Create the priv-mapping under the config.
     manager.getADConfigPtr()->create("admin", "priv-admin");
@@ -769,9 +769,9 @@
 
 TEST_F(TestLDAPConfig, testPrivileges)
 {
-    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
-    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tlsCacertFile;
-    auto tlsCertfile = std::string(dir.c_str()) + "/" + tlsCertFile;
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapConfFile;
+    auto tlsCACertFilePath = std::string(dir.c_str()) + "/" + tlsCACertFile;
+    auto tlsCertFilePath = std::string(dir.c_str()) + "/" + tlsCertFile;
     auto dbusPersistentFilePath = std::string(dir.c_str());
 
     if (fs::exists(configFilePath))
@@ -780,8 +780,8 @@
     }
     EXPECT_FALSE(fs::exists(configFilePath));
     MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
-                          dbusPersistentFilePath.c_str(), tlsCacertfile.c_str(),
-                          tlsCertfile.c_str());
+                          dbusPersistentFilePath.c_str(),
+                          tlsCACertFilePath.c_str(), tlsCertFilePath.c_str());
     manager.createDefaultObjects();
 
     std::string groupName = "admin";
diff --git a/test/user_mgr_test.cpp b/test/user_mgr_test.cpp
index 3059ea3..a7801ae 100644
--- a/test/user_mgr_test.cpp
+++ b/test/user_mgr_test.cpp
@@ -21,12 +21,12 @@
 class TestUserMgr : public testing::Test
 {
   public:
-    sdbusplus::SdBusMock sdbusMock;
+    sdbusplus::SdBusMock sdBusMock;
     sdbusplus::bus_t bus;
     MockManager mockManager;
 
     TestUserMgr() :
-        bus(sdbusplus::get_mocked_new(&sdbusMock)), mockManager(bus, objpath)
+        bus(sdbusplus::get_mocked_new(&sdBusMock)), mockManager(bus, objpath)
     {}
 
     void createLocalUser(const std::string& userName,
@@ -37,9 +37,9 @@
         tempObjPath /= userName;
         std::string userObj(tempObjPath);
         mockManager.usersList.emplace(
-            userName, std::move(std::make_unique<phosphor::user::Users>(
+            userName, std::make_unique<phosphor::user::Users>(
                           mockManager.bus, userObj.c_str(), groupNames, priv,
-                          enabled, mockManager)));
+                          enabled, mockManager));
     }
 
     DbusUserObj createPrivilegeMapperDbusObject(void)
@@ -47,14 +47,14 @@
         DbusUserObj object;
         DbusUserObjValue objValue;
 
-        DbusUserObjPath obj_path("/xyz/openbmc_project/user/ldap/openldap");
+        DbusUserObjPath objPath("/xyz/openbmc_project/user/ldap/openldap");
         DbusUserPropVariant enabled(true);
         DbusUserObjProperties property = {std::make_pair("Enabled", enabled)};
         std::string intf = "xyz.openbmc_project.Object.Enable";
         objValue.emplace(intf, property);
-        object.emplace(obj_path, objValue);
+        object.emplace(objPath, objValue);
 
-        DbusUserObjPath object_path(
+        DbusUserObjPath objectPath(
             "/xyz/openbmc_project/user/ldap/openldap/role_map/1");
         std::string group = "ldapGroup";
         std::string priv = "priv-admin";
@@ -63,7 +63,7 @@
         std::string interface = "xyz.openbmc_project.User.PrivilegeMapperEntry";
 
         objValue.emplace(interface, properties);
-        object.emplace(object_path, objValue);
+        object.emplace(objectPath, objValue);
 
         return object;
     }
@@ -73,12 +73,12 @@
         DbusUserObj object;
         DbusUserObjValue objValue;
 
-        DbusUserObjPath obj_path("/xyz/openbmc_project/user/ldap/openldap");
+        DbusUserObjPath objPath("/xyz/openbmc_project/user/ldap/openldap");
         DbusUserPropVariant enabled(true);
         DbusUserObjProperties property = {std::make_pair("Enabled", enabled)};
         std::string intf = "xyz.openbmc_project.Object.Enable";
         objValue.emplace(intf, property);
-        object.emplace(obj_path, objValue);
+        object.emplace(objPath, objValue);
         return object;
     }
 };
diff --git a/test/utils_test.cpp b/test/utils_test.cpp
index 7e152b6..5538449 100644
--- a/test/utils_test.cpp
+++ b/test/utils_test.cpp
@@ -9,8 +9,8 @@
 {
 namespace ldap
 {
-constexpr auto LDAPscheme = "ldap";
-constexpr auto LDAPSscheme = "ldaps";
+constexpr auto ldapScheme = "ldap";
+constexpr auto ldapsScheme = "ldaps";
 
 class TestUtil : public testing::Test
 {
@@ -23,59 +23,59 @@
 
 TEST_F(TestUtil, URIValidation)
 {
-    std::string ipaddress = "ldap://0.0.0.0";
-    EXPECT_EQ(true, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    std::string ipAddress = "ldap://0.0.0.0";
+    EXPECT_EQ(true, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldap://9.3.185.83";
-    EXPECT_EQ(true, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldap://9.3.185.83";
+    EXPECT_EQ(true, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldaps://9.3.185.83";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldaps://9.3.185.83";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldap://9.3.a.83";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldap://9.3.a.83";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldap://9.3.185.a";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldap://9.3.185.a";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldap://x.x.x.x";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldap://x.x.x.x";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldaps://0.0.0.0";
-    EXPECT_EQ(true, isValidLDAPURI(ipaddress.c_str(), LDAPSscheme));
+    ipAddress = "ldaps://0.0.0.0";
+    EXPECT_EQ(true, isValidLDAPURI(ipAddress.c_str(), ldapsScheme));
 
-    ipaddress = "ldap://0.0.0.0";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPSscheme));
+    ipAddress = "ldap://0.0.0.0";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapsScheme));
 
-    ipaddress = "ldaps://9.3.185.83";
-    EXPECT_EQ(true, isValidLDAPURI(ipaddress.c_str(), LDAPSscheme));
+    ipAddress = "ldaps://9.3.185.83";
+    EXPECT_EQ(true, isValidLDAPURI(ipAddress.c_str(), ldapsScheme));
 
-    ipaddress = "ldap://9.3.185.83";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPSscheme));
+    ipAddress = "ldap://9.3.185.83";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapsScheme));
 
-    ipaddress = "ldaps://9.3.185.83";
-    EXPECT_EQ(true, isValidLDAPURI(ipaddress.c_str(), LDAPSscheme));
+    ipAddress = "ldaps://9.3.185.83";
+    EXPECT_EQ(true, isValidLDAPURI(ipAddress.c_str(), ldapsScheme));
 
-    ipaddress = "ldaps://9.3.185.a";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPSscheme));
+    ipAddress = "ldaps://9.3.185.a";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapsScheme));
 
-    ipaddress = "ldaps://9.3.a.83";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPSscheme));
+    ipAddress = "ldaps://9.3.a.83";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapsScheme));
 
-    ipaddress = "ldaps://x.x.x.x";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPSscheme));
+    ipAddress = "ldaps://x.x.x.x";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapsScheme));
 
-    ipaddress = "ldap://9.3.185.83:70000";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldap://9.3.185.83:70000";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldap://9.3.185.83:-3";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldap://9.3.185.83:-3";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldap://9.3.185.83:221";
-    EXPECT_EQ(true, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldap://9.3.185.83:221";
+    EXPECT_EQ(true, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 
-    ipaddress = "ldap://9.3.185.83:0";
-    EXPECT_EQ(false, isValidLDAPURI(ipaddress.c_str(), LDAPscheme));
+    ipAddress = "ldap://9.3.185.83:0";
+    EXPECT_EQ(false, isValidLDAPURI(ipAddress.c_str(), ldapScheme));
 }
 } // namespace ldap
 } // namespace phosphor