test legacy
This commit is contained in:
		| @@ -55,30 +55,49 @@ struct local_s3 final { | |||||||
|   static constexpr provider_type type{provider_type::s3}; |   static constexpr provider_type type{provider_type::s3}; | ||||||
|   static constexpr provider_type type2{provider_type::s3}; |   static constexpr provider_type type2{provider_type::s3}; | ||||||
|   static constexpr std::uint16_t remote_port{41000U}; |   static constexpr std::uint16_t remote_port{41000U}; | ||||||
|  |   static constexpr bool force_legacy_encryption{false}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | struct local_s3_legacy final { | ||||||
|  |   static constexpr provider_type type{provider_type::s3}; | ||||||
|  |   static constexpr provider_type type2{provider_type::s3}; | ||||||
|  |   static constexpr std::uint16_t remote_port{41000U}; | ||||||
|  |   static constexpr bool force_legacy_encryption{true}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| struct local_sia final { | struct local_sia final { | ||||||
|   static constexpr provider_type type{provider_type::sia}; |   static constexpr provider_type type{provider_type::sia}; | ||||||
|   static constexpr provider_type type2{provider_type::sia}; |   static constexpr provider_type type2{provider_type::sia}; | ||||||
|   static constexpr std::uint16_t remote_port{41001U}; |   static constexpr std::uint16_t remote_port{41001U}; | ||||||
|  |   static constexpr bool force_legacy_encryption{false}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| struct remote_s3 final { | struct remote_s3 final { | ||||||
|   static constexpr provider_type type{provider_type::remote}; |   static constexpr provider_type type{provider_type::remote}; | ||||||
|   static constexpr provider_type type2{provider_type::s3}; |   static constexpr provider_type type2{provider_type::s3}; | ||||||
|   static constexpr std::uint16_t remote_port{41000U}; |   static constexpr std::uint16_t remote_port{41000U}; | ||||||
|  |   static constexpr bool force_legacy_encryption{false}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | struct remote_s3_legacy final { | ||||||
|  |   static constexpr provider_type type{provider_type::remote}; | ||||||
|  |   static constexpr provider_type type2{provider_type::s3}; | ||||||
|  |   static constexpr std::uint16_t remote_port{41000U}; | ||||||
|  |   static constexpr bool force_legacy_encryption{true}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| struct remote_sia final { | struct remote_sia final { | ||||||
|   static constexpr provider_type type{provider_type::remote}; |   static constexpr provider_type type{provider_type::remote}; | ||||||
|   static constexpr provider_type type2{provider_type::sia}; |   static constexpr provider_type type2{provider_type::sia}; | ||||||
|   static constexpr std::uint16_t remote_port{41001U}; |   static constexpr std::uint16_t remote_port{41001U}; | ||||||
|  |   static constexpr bool force_legacy_encryption{false}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| struct remote_linux_to_winfsp final { | struct remote_linux_to_winfsp final { | ||||||
|   static constexpr provider_type type{provider_type::remote}; |   static constexpr provider_type type{provider_type::remote}; | ||||||
|   static constexpr provider_type type2{provider_type::unknown}; |   static constexpr provider_type type2{provider_type::unknown}; | ||||||
|   static constexpr std::uint16_t remote_port{41002U}; |   static constexpr std::uint16_t remote_port{41002U}; | ||||||
|  |   static constexpr bool force_legacy_encryption{false}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| template <typename provider_t> class fuse_test : public ::testing::Test { | template <typename provider_t> class fuse_test : public ::testing::Test { | ||||||
| @@ -119,9 +138,12 @@ protected: | |||||||
|               provider_type::s3, |               provider_type::s3, | ||||||
|               utils::path::combine(test::get_test_config_dir(), {"s3"}), |               utils::path::combine(test::get_test_config_dir(), {"s3"}), | ||||||
|           }; |           }; | ||||||
|  |  | ||||||
|  |           auto cfg = src_cfg.get_s3_config(); | ||||||
|  |           cfg.force_legacy_encryption = provider_t::force_legacy_encryption; | ||||||
|           config->set_enable_drive_events(true); |           config->set_enable_drive_events(true); | ||||||
|           config->set_event_level(event_level::trace); |           config->set_event_level(event_level::trace); | ||||||
|           config->set_s3_config(src_cfg.get_s3_config()); |           config->set_s3_config(cfg); | ||||||
|  |  | ||||||
|           auto r_cfg = config->get_remote_mount(); |           auto r_cfg = config->get_remote_mount(); | ||||||
|           r_cfg.enable = true; |           r_cfg.enable = true; | ||||||
| @@ -446,7 +468,8 @@ template <typename provider_t> | |||||||
| std::string fuse_test<provider_t>::mount_location2; | std::string fuse_test<provider_t>::mount_location2; | ||||||
|  |  | ||||||
| using fuse_provider_types = | using fuse_provider_types = | ||||||
|     ::testing::Types<local_s3, remote_s3, local_sia, remote_sia>; |     ::testing::Types<local_s3, local_s3_legacy, remote_s3, remote_s3_legacy, | ||||||
|  |                      local_sia, remote_sia>; | ||||||
| // using fuse_provider_types = | // using fuse_provider_types = | ||||||
| //     ::testing::Types<local_s3, remote_s3, local_sia, remote_sia, | //     ::testing::Types<local_s3, remote_s3, local_sia, remote_sia, | ||||||
| //     remote_linux_to_winfsp>; | //     remote_linux_to_winfsp>; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user