Tweak test to use new ConfigMail constructors

master
Gernot Kranz 3 weeks ago
parent d6037ce1d5
commit d3e7c23ff4

1
.gitignore vendored

@ -91,3 +91,4 @@ mono/*.c
mono/*.h
# test
/test/secrets.hh

@ -5,7 +5,7 @@ all: src
src:
$(MAKE) -C src
test: src
test: install
$(MAKE) -C test
clean:

@ -7,13 +7,16 @@
#include <unistd.h>
#include <iostream>
#include <string>
#include "secrets.hh"
using namespace pEp;
using namespace pEp::Test::Utils;
using namespace pEp::Mail;
std::atomic<bool> echo_received{ false };
std::string nickname = "bob";
extern std::string mailaddress;
extern Login lsend;
extern Login lrecv;
void usage() {}
@ -55,14 +58,16 @@ int main(int argc, char** argv)
echo_received.store(true);
});
pEpTransportMail::ConfigMail cfg{ nickname + ".mail" };
// Prepare Config
pEpIdent own_ident = createOwnIdent(mailaddress);
pEpTransportMail::ConfigMail cfg{ own_ident.get(), lsend, lrecv };
mail.configure(cfg);
mail.startup();
// pEp
Adapter::session.initialize();
// Create/Load own identity
pEpIdent own_ident = createOwnIdent(mail.own_address());
::PEP_STATUS status = ::myself(Adapter::session(), own_ident.get());
pEp::throw_status(status);
pEpLog("Own Address [ " + mail.own_address() + " ]");

Loading…
Cancel
Save