From f5bd891cf5afb30085d1a5e93d86bd022c097238 Mon Sep 17 00:00:00 2001 From: Tom Joseph Date: Mon, 19 Nov 2018 09:49:21 +0530 Subject: Refactor mapper application to enable unit tests Change-Id: I58cac8879f93ce49bfb654a1bf559d7f77b5b486 Signed-off-by: Tom Joseph --- phosphor-ldap-mapper/ldap_mapper_serialize.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'phosphor-ldap-mapper/ldap_mapper_serialize.cpp') 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); -- cgit v1.2.1