diff options
author | Tom Joseph <tomjoseph@in.ibm.com> | 2018-11-19 09:49:21 +0530 |
---|---|---|
committer | Tom Joseph <tomjoseph@in.ibm.com> | 2018-11-20 09:45:55 +0530 |
commit | f5bd891cf5afb30085d1a5e93d86bd022c097238 (patch) | |
tree | 426c12cf2da3825056392426114aa3b919acde23 /phosphor-ldap-mapper/ldap_mapper_serialize.cpp | |
parent | 23886efd0780cd6c87741a9ecac2d55d9ab4c7a8 (diff) | |
download | phosphor-user-manager-f5bd891cf5afb30085d1a5e93d86bd022c097238.tar.gz phosphor-user-manager-f5bd891cf5afb30085d1a5e93d86bd022c097238.zip |
Refactor mapper application to enable unit tests
Change-Id: I58cac8879f93ce49bfb654a1bf559d7f77b5b486
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'phosphor-ldap-mapper/ldap_mapper_serialize.cpp')
-rw-r--r-- | phosphor-ldap-mapper/ldap_mapper_serialize.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/phosphor-ldap-mapper/ldap_mapper_serialize.cpp b/phosphor-ldap-mapper/ldap_mapper_serialize.cpp index 534e0a1..3ef809e 100644 --- a/phosphor-ldap-mapper/ldap_mapper_serialize.cpp +++ b/phosphor-ldap-mapper/ldap_mapper_serialize.cpp @@ -54,9 +54,8 @@ void load(Archive& archive, LDAPMapperEntry& entry, const std::uint32_t version) privilege(privilege, true); } -fs::path serialize(const LDAPMapperEntry& entry, Id id) +fs::path serialize(const LDAPMapperEntry& entry, Id id, const fs::path& dir) { - fs::path dir(LDAP_MAPPER_PERSIST_PATH); auto path = dir / std::to_string(id); std::ofstream os(path.c_str(), std::ios::binary); cereal::BinaryOutputArchive oarchive(os); |