Browse Source

Tests: PityTest - PityNode add inbox dir

LIB-11
heck 4 years ago
parent
commit
9849a98124
  1. 13
      test/pitytest11/src/PityNode.cc
  2. 2
      test/pitytest11/src/PityNode.hh

13
test/pitytest11/src/PityNode.cc

@ -29,23 +29,23 @@ namespace pEp {
void PityNode::_init(const PityUnit<PityModel>& unit)
{
unit.log("INIT - " + getName());
unit.log("NODE INIT - " + getName());
unit.getModel()->own_node = this;
unit.getModel()->setName("Copy for:" + getName());
unit.log("INIT DONE");
unit.log("NODE INIT DONE");
}
std::string PityNode::getName() const
{
std::string ret{};
ret += "node_" + std::to_string(_node_nr);
ret += "node_" + std::to_string(_node_nr) + "@peptest.org";
return ret;
}
std::string PityNode::to_string() const
{
std::string ret{};
ret += "node_" + std::to_string(_node_nr);
ret += "name: " +getName();
return ret;
}
@ -53,5 +53,10 @@ namespace pEp {
{
return _process_unit;
}
std::string PityNode::inboxDir() const {
return getProcessUnit()->processDir() + "inbox/";
}
} // namespace PityTest11
} // namespace pEp

2
test/pitytest11/src/PityNode.hh

@ -18,7 +18,7 @@ namespace pEp {
std::string getName() const;
std::string to_string() const;
const std::shared_ptr<PityUnit<PityModel>>& getProcessUnit() const;
std::string inboxDir() const;
//internal logging
static bool debug_log_enabled;
Adapter::pEpLog::pEpLogger logger_debug{ "PityNode", debug_log_enabled };

Loading…
Cancel
Save