summaryrefslogtreecommitdiffstats
path: root/src/test/rgw
diff options
context:
space:
mode:
authorYuval Lifshitz <ylifshit@redhat.com>2023-09-20 11:46:54 +0200
committerYuval Lifshitz <ylifshit@redhat.com>2023-10-12 06:54:37 +0200
commitc992ab86d644410c4a03b48d4a7b372dbc2efd02 (patch)
tree559d966090463ae56e97fbdd5803818f5f9e6986 /src/test/rgw
parentMerge pull request #53971 from zdover23/wip-doc-2023-10-12-start-get-involved... (diff)
downloadceph-c992ab86d644410c4a03b48d4a7b372dbc2efd02.tar.xz
ceph-c992ab86d644410c4a03b48d4a7b372dbc2efd02.zip
rgw: adding request context structure
this structure should be created at the frontend and trickle all the way to the RADOS layer. holding: dout prefix, optional yield and trace. in this commit, so far it was only added to the "complete()" sal interface, and to the "write_meta()" rados interface. in the future, it should be added to more sal interfaces, replacing the current way where dpp and optional yield are passed as sepearte arguments to all functions. in addition, if more information would be needed, it should be possible to add that information to the request context struct without changing many function prototypes basic test instructions: https://gist.github.com/yuvalif/1c7f1e80126bed5fa79345efb27fe1b1 Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
Diffstat (limited to 'src/test/rgw')
-rw-r--r--src/test/rgw/test_d4n_filter.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/rgw/test_d4n_filter.cc b/src/test/rgw/test_d4n_filter.cc
index 30a508cf709..7ceb7092c64 100644
--- a/src/test/rgw/test_d4n_filter.cc
+++ b/src/test/rgw/test_d4n_filter.cc
@@ -25,6 +25,7 @@ string redisHost = "";
vector<const char*> args;
class Environment* env;
const DoutPrefixProvider* dpp;
+const req_context rctx{dpp, null_yield, nullptr};
class StoreObject : public rgw::sal::StoreObject {
friend class D4NFilterFixture;
@@ -194,7 +195,7 @@ class D4NFilterFixture : public ::testing::Test {
&if_match, &if_nomatch,
&user_data,
&zones_trace, &canceled,
- null_yield);
+ rctx);
return ret;
}
@@ -454,7 +455,7 @@ TEST_F(D4NFilterFixture, CopyObjectReplace) {
&if_match, &if_nomatch,
&user_data,
&zones_trace, &canceled,
- null_yield), 0);
+ rctx), 0);
unique_ptr<rgw::sal::Object> testObject_copy = testBucket->get_object(rgw_obj_key("test_object_copy"));
@@ -579,7 +580,7 @@ TEST_F(D4NFilterFixture, CopyObjectMerge) {
&if_match, &if_nomatch,
&user_data,
&zones_trace, &canceled,
- null_yield), 0);
+ rctx), 0);
unique_ptr<rgw::sal::Object> testObject_copy = testBucket->get_object(rgw_obj_key("test_object_copy"));
@@ -1913,7 +1914,7 @@ TEST_F(D4NFilterFixture, DataCheck) {
&if_match, &if_nomatch,
&user_data,
&zones_trace, &canceled,
- null_yield), 0);
+ rctx), 0);
client.hget("rgw-object:test_object_DataCheck:cache", "data", [&data](cpp_redis::reply& reply) {
if (reply.is_string()) {
@@ -1938,7 +1939,7 @@ TEST_F(D4NFilterFixture, DataCheck) {
&if_match, &if_nomatch,
&user_data,
&zones_trace, &canceled,
- null_yield), 0);
+ rctx), 0);
client.hget("rgw-object:test_object_DataCheck:cache", "data", [&dataNew](cpp_redis::reply& reply) {
if (reply.is_string()) {