From ff007bca7f24bc340277704704f302183ce9da00 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sun, 24 Nov 2024 17:25:05 -0600 Subject: [PATCH] future support --- .../include/fixtures/fuse_fixture.hpp | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/repertory/repertory_test/include/fixtures/fuse_fixture.hpp b/repertory/repertory_test/include/fixtures/fuse_fixture.hpp index 60db866f..24aaf7d4 100644 --- a/repertory/repertory_test/include/fixtures/fuse_fixture.hpp +++ b/repertory/repertory_test/include/fixtures/fuse_fixture.hpp @@ -52,21 +52,37 @@ namespace repertory { struct local_s3 final { static constexpr const provider_type type{provider_type::s3}; static constexpr const provider_type type2{provider_type::s3}; + static constexpr const bool swapped{false}; }; struct local_sia final { static constexpr const provider_type type{provider_type::sia}; static constexpr const provider_type type2{provider_type::sia}; + static constexpr const bool swapped{false}; }; struct remote_s3 final { static constexpr const provider_type type{provider_type::remote}; static constexpr const provider_type type2{provider_type::s3}; + static constexpr const bool swapped{false}; }; struct remote_sia final { static constexpr const provider_type type{provider_type::remote}; static constexpr const provider_type type2{provider_type::sia}; + static constexpr const bool swapped{false}; +}; + +struct remote_winfsp_s3 final { + static constexpr const provider_type type{provider_type::remote}; + static constexpr const provider_type type2{provider_type::s3}; + static constexpr const bool swapped{true}; +}; + +struct remote_winfsp_sia final { + static constexpr const provider_type type{provider_type::remote}; + static constexpr const provider_type type2{provider_type::sia}; + static constexpr const bool swapped{true}; }; template class fuse_test : public ::testing::Test { @@ -126,6 +142,8 @@ protected: execute_mount(drive_args, mount_location); }; + const auto mount_winfsp_s3 = [&]() {}; + const auto mount_sia = [&]() { { auto test_directory = utils::path::combine( @@ -168,6 +186,8 @@ protected: execute_mount(drive_args, mount_location); }; + const auto mount_winfsp_sia = [&]() {}; + const auto mount_remote = [&]() { { mount_location2 = mount_location; @@ -215,11 +235,19 @@ protected: case provider_type::remote: { switch (provider_t::type2) { case provider_type::s3: { - mount_s3(); + if (provider_t::swapped) { + mount_winfsp_s3(); + } else { + mount_s3(); + } } break; case provider_type::sia: { - mount_sia(); + if (provider_t::swapped) { + mount_winfsp_sia(); + } else { + mount_sia(); + } } break; default: