userver: /data/code/userver/libraries/s3api/utest/include/userver/s3api/utest/client_gmock.hpp Source File
Loading...
Searching...
No Matches
client_gmock.hpp
1#pragma once
2
3#include <userver/s3api/clients/s3api.hpp>
4
5#include <gmock/gmock.h>
6#include <userver/utest/utest.hpp>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace s3api {
11
12class GMockClient : public Client {
13public:
14 MOCK_METHOD(
15 std::string,
17 (std::string_view path,
18 std::string data,
19 const std::optional<Meta>& meta,
20 std::string_view content_type,
21 const std::optional<std::string>& content_disposition,
22 const std::optional<std::vector<Tag>>& tags),
23 (const, override)
24 );
25
26 MOCK_METHOD(void, DeleteObject, (std::string_view path), (const, override));
27
28 MOCK_METHOD(
29 std::optional<std::string>,
31 (std::string_view path,
32 std::optional<std::string> version,
33 HeadersDataResponse* headers_data,
34 const HeaderDataRequest& headers_request),
35 (const, override)
36 );
37
38 MOCK_METHOD(
39 std::string,
41 (std::string_view path,
42 std::optional<std::string> version,
43 HeadersDataResponse* headers_data,
44 const HeaderDataRequest& headers_request),
45 (const, override)
46 );
47
48 MOCK_METHOD(
49 std::optional<std::string>,
51 (std::string_view path,
52 std::string_view range,
53 std::optional<std::string> version,
54 HeadersDataResponse* headers_data,
55 const HeaderDataRequest& headers_request),
56 (const, override)
57 );
58
59 MOCK_METHOD(
60 std::string,
62 (std::string_view path,
63 std::string_view range,
64 std::optional<std::string> version,
65 HeadersDataResponse* headers_data,
66 const HeaderDataRequest& headers_request),
67 (const, override)
68 );
69
70 MOCK_METHOD(
71 std::string,
73 (std::string_view key_from, std::string_view bucket_to, std::string_view key_to, const std::optional<Meta>& meta
74 ),
75 (override)
76 );
77
78 MOCK_METHOD(
79 std::string,
81 (std::string_view key_from, std::string_view key_to, const std::optional<Meta>& meta),
82 (override)
83 );
84
85 MOCK_METHOD(
86 std::optional<HeadersDataResponse>,
88 (std::string_view path, const HeaderDataRequest& request),
89 (const, override)
90 );
91
92 MOCK_METHOD(
93 std::string,
95 (std::string_view path, time_t expires, bool use_ssl),
96 (const, override)
97 );
98
99 MOCK_METHOD(
100 std::string,
102 (std::string_view path, const std::chrono::system_clock::time_point& expires_at, std::string_view protocol),
103 (const, override)
104 );
105
106 MOCK_METHOD(
107 std::string,
109 (std::string_view data,
110 std::string_view content_type,
111 std::string_view path,
112 const std::chrono::system_clock::time_point& expires_at,
113 std::string_view protocol),
114 (const, override)
115 );
116
117 MOCK_METHOD(
118 std::optional<std::string>,
120 (std::string_view path, int max_keys, std::string marker, std::string delimiter),
121 (const, override)
122 );
123
124 MOCK_METHOD(std::vector<ObjectMeta>, ListBucketContentsParsed, (std::string_view path_prefix), (const, override));
125
126 MOCK_METHOD(std::vector<std::string>, ListBucketDirectories, (std::string_view path_prefix), (const, override));
127
128 MOCK_METHOD(void, UpdateConfig, (ConnectionCfg && config), (override));
129
130 MOCK_METHOD(std::string_view, GetBucketName, (), (const, override));
131};
132
133} // namespace s3api
134
135USERVER_NAMESPACE_END