]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW/standalone: fixed jenkins issues
authorAli Masarwa <amasarwa@redhat.com>
Thu, 24 Apr 2025 08:39:37 +0000 (11:39 +0300)
committerAli Masarwa <amasarwa@redhat.com>
Tue, 29 Apr 2025 12:31:09 +0000 (15:31 +0300)
Signed-off-by: Ali Masarwa <amasarwa@redhat.com>
src/test/rgw/test_rgw_period_history.cc

index 25ea87d3a2f552fd77604a88b9ca31d8503daf72..4ff94b716df765f6ac6981169aa18b9befaa5913 100644 (file)
@@ -36,7 +36,7 @@ const auto current_period = make_period("5", 5, "4");
 
 // mock puller that throws an exception if it's called
 struct ErrorPuller : public RGWPeriodHistory::Puller {
-  int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
+  int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore) override {
     throw std::runtime_error("unexpected call to pull");
   }
 };
@@ -49,7 +49,7 @@ class RecordingPuller : public RGWPeriodHistory::Puller {
  public:
   explicit RecordingPuller(int error) : error(error) {}
   Ids ids;
-  int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
+  int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore) override {
     ids.push_back(id);
     return error;
   }
@@ -57,7 +57,7 @@ class RecordingPuller : public RGWPeriodHistory::Puller {
 
 // mock puller that returns a fake period by parsing the period id
 struct NumericPuller : public RGWPeriodHistory::Puller {
-  int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
+  int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore) override {
     // relies on numeric period ids to divine the realm_epoch
     auto realm_epoch = boost::lexical_cast<epoch_t>(id);
     auto predecessor = boost::lexical_cast<std::string>(realm_epoch-1);
@@ -135,7 +135,7 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent)
 
   // create a disjoint history at 1 and verify that periods are requested
   // backwards from current_period
-  auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
+  auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr);
   ASSERT_FALSE(c1);
   ASSERT_EQ(-EFAULT, c1.get_error());
   ASSERT_EQ(Ids{"4"}, puller.ids);
@@ -143,7 +143,7 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent)
   auto c4 = history.insert(make_period("4", 4, "3"));
   ASSERT_TRUE(c4);
 
-  c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
+  c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr);
   ASSERT_FALSE(c1);
   ASSERT_EQ(-EFAULT, c1.get_error());
   ASSERT_EQ(Ids({"4", "3"}), puller.ids);
@@ -151,7 +151,7 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent)
   auto c3 = history.insert(make_period("3", 3, "2"));
   ASSERT_TRUE(c3);
 
-  c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
+  c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr);
   ASSERT_FALSE(c1);
   ASSERT_EQ(-EFAULT, c1.get_error());
   ASSERT_EQ(Ids({"4", "3", "2"}), puller.ids);
@@ -159,7 +159,7 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent)
   auto c2 = history.insert(make_period("2", 2, "1"));
   ASSERT_TRUE(c2);
 
-  c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
+  c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr);
   ASSERT_TRUE(c1);
   ASSERT_EQ(Ids({"4", "3", "2"}), puller.ids);
 }
@@ -172,22 +172,22 @@ TEST(PeriodHistory, PullPredecessorsAfterCurrent)
 
   // create a disjoint history at 9 and verify that periods are requested
   // backwards down to current_period
-  auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield);
+  auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield, nullptr);
   ASSERT_FALSE(c9);
   ASSERT_EQ(-EFAULT, c9.get_error());
   ASSERT_EQ(Ids{"8"}, puller.ids);
 
-  auto c8 = history.attach(&dp, make_period("8", 8, "7"), null_yield);
+  auto c8 = history.attach(&dp, make_period("8", 8, "7"), null_yield, nullptr);
   ASSERT_FALSE(c8);
   ASSERT_EQ(-EFAULT, c8.get_error());
   ASSERT_EQ(Ids({"8", "7"}), puller.ids);
 
-  auto c7 = history.attach(&dp, make_period("7", 7, "6"), null_yield);
+  auto c7 = history.attach(&dp, make_period("7", 7, "6"), null_yield, nullptr);
   ASSERT_FALSE(c7);
   ASSERT_EQ(-EFAULT, c7.get_error());
   ASSERT_EQ(Ids({"8", "7", "6"}), puller.ids);
 
-  auto c6 = history.attach(&dp, make_period("6", 6, "5"), null_yield);
+  auto c6 = history.attach(&dp, make_period("6", 6, "5"), null_yield, nullptr);
   ASSERT_TRUE(c6);
   ASSERT_EQ(Ids({"8", "7", "6"}), puller.ids);
 }
@@ -275,7 +275,7 @@ TEST(PeriodHistory, AttachBefore)
   RGWPeriodHistory history(g_ceph_context, &puller, current_period);
   const DoutPrefix dp(g_ceph_context, 1, "test rgw period history: ");
 
-  auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
+  auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield, nullptr);
   ASSERT_TRUE(c1);
 
   // verify that we pulled and merged all periods from 1-5
@@ -302,7 +302,7 @@ TEST(PeriodHistory, AttachAfter)
   RGWPeriodHistory history(g_ceph_context, &puller, current_period);
   const DoutPrefix dp(g_ceph_context, 1, "test rgw period history: ");
 
-  auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield);
+  auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield, nullptr);
   ASSERT_TRUE(c9);
 
   // verify that we pulled and merged all periods from 5-9