1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

load config differently for unit tests because they run as root in CI for some reason

This commit is contained in:
Jeff Becker 2020-06-16 10:40:24 -04:00
parent 98a3b45f16
commit 0787b6e2fd
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -10,8 +10,9 @@ llarp_main*
make_context()
{
// make config
auto config = llarp_default_relay_config();
auto config = new llarp_config();
REQUIRE(config != nullptr);
REQUIRE(config->impl.LoadDefault(true, fs::current_path()));
// set testing defaults
config->impl.network.m_endpointType = "null";
config->impl.bootstrap.skipBootstrap = true;
@ -31,7 +32,7 @@ make_context()
TEST_CASE("ensure snode address allocation", "[snode]")
{
// llarp::LogSilencer shutup;
llarp::LogSilencer shutup;
auto ctx = make_context();
REQUIRE(llarp_main_setup(ctx, true) == 0);
auto ctx_pp = llarp::Context::Get(ctx);