diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-16 21:26:19 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-16 21:26:19 +0000 |
commit | cc659af86c2a1a1e962faf8f27027645700ce64e (patch) | |
tree | 60882b4900e95d54ee38a18272227391d07514aa | |
parent | Factor FuseMountPoint mock into its own file (diff) | |
download | netfs-cc659af86c2a1a1e962faf8f27027645700ce64e.tar.bz2 netfs-cc659af86c2a1a1e962faf8f27027645700ce64e.tar.xz netfs-cc659af86c2a1a1e962faf8f27027645700ce64e.zip |
Remove seemingly pointless 'Run' classnetfs-1.4.1
-rw-r--r-- | netfs/unittests/mockMount.cpp | 1 | ||||
-rw-r--r-- | netfs/unittests/testFuse.cpp | 18 |
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"; |