PamModuleArgValue: add unit test coverage

This commit refactorred the codes such that it becomes possible to unit
test the two non-trivial method: setPamModuleArgValue and
getPamModuleArgValue.

The unit test manipulates temporary files in the unit test container
instead of real pam configs.

Check the coverage data before and after this commit to see how these
two files now get nearly 100% unit test coverage.

Tested: unit test.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ibad461ace0eae89183de0ddbfb189ee0458b1d2e
diff --git a/user_mgr.cpp b/user_mgr.cpp
index b2047b2..390981c 100644
--- a/user_mgr.cpp
+++ b/user_mgr.cpp
@@ -72,8 +72,10 @@
 static constexpr const char* remOldPasswdCount = "remember";
 static constexpr const char* maxFailedAttempt = "deny";
 static constexpr const char* unlockTimeout = "unlock_time";
-static constexpr const char* pamPasswdConfigFile = "/etc/pam.d/common-password";
-static constexpr const char* pamAuthConfigFile = "/etc/pam.d/common-auth";
+static constexpr const char* defaultPamPasswdConfigFile =
+    "/etc/pam.d/common-password";
+static constexpr const char* defaultPamAuthConfigFile =
+    "/etc/pam.d/common-auth";
 
 // Object Manager related
 static constexpr const char* ldapMgrObjBasePath =
@@ -1226,7 +1228,9 @@
 }
 
 UserMgr::UserMgr(sdbusplus::bus_t& bus, const char* path) :
-    Ifaces(bus, path, Ifaces::action::defer_emit), bus(bus), path(path)
+    Ifaces(bus, path, Ifaces::action::defer_emit), bus(bus), path(path),
+    pamPasswdConfigFile(defaultPamPasswdConfigFile),
+    pamAuthConfigFile(defaultPamAuthConfigFile)
 {
     UserMgrIface::allPrivileges(privMgr);
     std::sort(groupsMgr.begin(), groupsMgr.end());