summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-12-16 21:26:19 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-12-16 21:26:19 +0000
commitcc659af86c2a1a1e962faf8f27027645700ce64e (patch)
tree60882b4900e95d54ee38a18272227391d07514aa
parentFactor FuseMountPoint mock into its own file (diff)
downloadnetfs-1.4.1.tar.bz2
netfs-1.4.1.tar.xz
netfs-1.4.1.zip
Remove seemingly pointless 'Run' classnetfs-1.4.1
-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";