summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netfs/unittests/mockMount.cpp1
-rw-r--r--netfs/unittests/testFuse.cpp18
2 files changed, 1 insertions, 18 deletions
diff --git a/netfs/unittests/mockMount.cpp b/netfs/unittests/mockMount.cpp
index 7655296..515d2cc 100644
--- a/netfs/unittests/mockMount.cpp
+++ b/netfs/unittests/mockMount.cpp
@@ -17,6 +17,7 @@ FuseMountPoint::FuseMountPoint() :
::fuse_opt_add_arg(&fargs, "-oac_attr_timeout=0");
fs = ::fuse_new(&fargs, &operations, sizeof(fuse_operations), this);
BOOST_REQUIRE(fs);
+ start();
}
void
diff --git a/netfs/unittests/testFuse.cpp b/netfs/unittests/testFuse.cpp
index dd773b2..a95b956 100644
--- a/netfs/unittests/testFuse.cpp
+++ b/netfs/unittests/testFuse.cpp
@@ -41,31 +41,13 @@ get_lstat(const std::filesystem::path & p)
BOOST_FIXTURE_TEST_SUITE(fmp, FuseMountPoint);
-class Run {
-public:
- Run(FuseMountPoint * _p) : p {_p}
- {
- p->start();
- }
- ~Run()
- {
- p->stop();
- }
- SPECIAL_MEMBERS_DELETE(Run);
-
-private:
- FuseMountPoint * p;
-};
-
BOOST_AUTO_TEST_CASE(fuse, *boost::unit_test::timeout(5))
{
- Run r {this};
BOOST_REQUIRE(std::filesystem::is_directory(mntpnt));
}
BOOST_AUTO_TEST_CASE(fuse_ls, *boost::unit_test::timeout(5))
{
- Run r {this};
BOOST_REQUIRE(std::filesystem::is_directory(mntpnt));
BOOST_REQUIRE(std::filesystem::is_empty(mntpnt));
const auto rpath = mntpnt / "me";