Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dhtnet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
dhtnet
Commits
9176131a
Commit
9176131a
authored
1 year ago
by
François-Simon Fauteux-Chapleau
Committed by
Adrien Béraud
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
tests: delete temporary files created by the connectionManager tests
Change-Id: I04083e87c281634d0109df6836bd336f30d0fd37
parent
67222a73
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/connectionManager.cpp
+5
-2
5 additions, 2 deletions
tests/connectionManager.cpp
with
5 additions
and
2 deletions
tests/connectionManager.cpp
+
5
−
2
View file @
9176131a
...
...
@@ -58,6 +58,7 @@ public:
// logger->debug("Using PJSIP version {} for {}", pj_get_version(), PJ_OS_NAME);
// logger->debug("Using GnuTLS version {}", gnutls_check_version(nullptr));
// logger->debug("Using OpenDHT version {}", dht::version());
testDir_
=
std
::
filesystem
::
current_path
()
/
"tmp_tests_connectionManager"
;
}
~
ConnectionManagerTest
()
{}
static
std
::
string
name
()
{
return
"ConnectionManager"
;
}
...
...
@@ -80,6 +81,7 @@ public:
private
:
std
::
unique_ptr
<
ConnectionHandler
>
setupHandler
(
const
dht
::
crypto
::
Identity
&
id
,
const
std
::
string
&
bootstrap
=
"bootstrap.jami.net"
);
std
::
filesystem
::
path
testDir_
;
void
testConnectDevice
();
void
testAcceptConnection
();
...
...
@@ -142,7 +144,7 @@ ConnectionManagerTest::setupHandler(const dht::crypto::Identity& id, const std::
auto
h
=
std
::
make_unique
<
ConnectionHandler
>
();
h
->
id
=
id
;
h
->
logger
=
{};
//logger;
h
->
certStore
=
std
::
make_shared
<
tls
::
CertificateStore
>
(
id
.
second
->
getName
(),
nullptr
/*h->logger*/
);
h
->
certStore
=
std
::
make_shared
<
tls
::
CertificateStore
>
(
testDir_
/
id
.
second
->
getName
(),
nullptr
/*h->logger*/
);
h
->
ioContext
=
ioContext
;
h
->
ioContextRunner
=
ioContextRunner
;
...
...
@@ -170,7 +172,7 @@ ConnectionManagerTest::setupHandler(const dht::crypto::Identity& id, const std::
config
->
factory
=
factory
;
// config->logger = logger;
config
->
certStore
=
h
->
certStore
;
config
->
cachePath
=
std
::
filesystem
::
current_path
()
/
id
.
second
->
getName
()
/
"temp"
;
config
->
cachePath
=
testDir_
/
id
.
second
->
getName
()
/
"temp"
;
h
->
connectionManager
=
std
::
make_shared
<
ConnectionManager
>
(
config
);
h
->
connectionManager
->
onICERequest
([](
const
DeviceId
&
)
{
return
true
;
});
...
...
@@ -223,6 +225,7 @@ ConnectionManagerTest::tearDown()
alice
.
reset
();
bob
.
reset
();
factory
.
reset
();
std
::
filesystem
::
remove_all
(
testDir_
);
}
void
ConnectionManagerTest
::
testConnectDevice
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment