ThrowForInvalidPrivilege: add unit test
This commit adds unit test for the |throwForInvalidPrivilege| function.
Tested: unit test passed
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I0722ce2483adeffd493528c9c952aea9af181de6
diff --git a/user_mgr.hpp b/user_mgr.hpp
index c0ebe0b..9f2770d 100644
--- a/user_mgr.hpp
+++ b/user_mgr.hpp
@@ -313,6 +313,13 @@
virtual void executeUserDelete(const char* userName);
+ /** @brief check for valid privielge
+ * method to check valid privilege, and throw if invalid
+ *
+ * @param[in] priv - privilege of the user
+ */
+ void throwForInvalidPrivilege(const std::string& priv);
+
private:
/** @brief sdbusplus handler */
sdbusplus::bus_t& bus;
@@ -348,13 +355,6 @@
*/
UserSSHLists getUserAndSshGrpList(void);
- /** @brief check for valid privielge
- * method to check valid privilege, and throw if invalid
- *
- * @param[in] priv - privilege of the user
- */
- void throwForInvalidPrivilege(const std::string& priv);
-
/** @brief check for valid groups
* method to check valid groups, and throw if invalid
*