summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-04-01 20:18:41 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2020-04-01 20:18:41 +0100
commite945f0efa92fd32e09abc3635f8160e95e11686b (patch)
tree3177a5b7cfc9ba39e509d2db1e64c9524010ec49
parentConfigure settings from URI params (diff)
downloadnetfs-e945f0efa92fd32e09abc3635f8160e95e11686b.tar.bz2
netfs-e945f0efa92fd32e09abc3635f8160e95e11686b.tar.xz
netfs-e945f0efa92fd32e09abc3635f8160e95e11686b.zip
Remove glacier.pid before and after runs of test
-rw-r--r--netfs/unittests/testGlacier.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/netfs/unittests/testGlacier.cpp b/netfs/unittests/testGlacier.cpp
index 44f52f4..f4474fb 100644
--- a/netfs/unittests/testGlacier.cpp
+++ b/netfs/unittests/testGlacier.cpp
@@ -6,15 +6,18 @@
#include <definedDirs.h>
const std::string testEndpoint("tcp -h localhost -p 12013");
+#define PID "/tmp/glacier.pid"
BOOST_AUTO_TEST_CASE ( withRouter )
{
+ std::filesystem::remove(PID);
BOOST_REQUIRE_EQUAL(0,
- system("/usr/bin/glacier2router --Glacier2.Client.Endpoints='tcp -p 14063' --Glacier2.PermissionsVerifier=Glacier2/NullPermissionsVerifier --daemon --pidfile /tmp/glacier.pid"));
+ system("/usr/bin/glacier2router --Glacier2.Client.Endpoints='tcp -p 14063' --Glacier2.PermissionsVerifier=Glacier2/NullPermissionsVerifier --daemon --pidfile " PID));
sleep(1);
BOOST_SCOPE_EXIT(void) {
- BOOST_REQUIRE_EQUAL(0, system("kill $(cat /tmp/glacier.pid)"));
+ BOOST_REQUIRE_EQUAL(0, system("kill $(cat " PID ")"));
+ std::filesystem::remove(PID);
} BOOST_SCOPE_EXIT_END;
{