From 8491bc1885269dae731cf942a05d01603b5b8592 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 26 May 2017 23:01:26 -0400 Subject: [PATCH] ceph_test_rados_api_tier: skip redirect tests if not luminous Signed-off-by: Sage Weil --- src/test/librados/tier.cc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/test/librados/tier.cc b/src/test/librados/tier.cc index a7a5995dfd7..1296acd0b75 100755 --- a/src/test/librados/tier.cc +++ b/src/test/librados/tier.cc @@ -2746,6 +2746,19 @@ TEST_F(LibRadosTwoPoolsPP, CachePin) { } TEST_F(LibRadosTwoPoolsPP, SetRedirectRead) { + // skip test if not yet luminous + { + bufferlist inbl, outbl; + ASSERT_EQ(0, cluster.mon_command( + "{\"prefix\": \"osd dump\"}", + inbl, &outbl, NULL)); + string s(outbl.c_str(), outbl.length()); + if (s.find("luminous") == std::string::npos) { + cout << "cluster is not yet luminous, skipping test" << std::endl; + return; + } + } + // create object { bufferlist bl; @@ -5432,6 +5445,19 @@ TEST_F(LibRadosTwoPoolsECPP, CachePin) { cluster.wait_for_latest_osdmap(); } TEST_F(LibRadosTwoPoolsECPP, SetRedirectRead) { + // skip test if not yet luminous + { + bufferlist inbl, outbl; + ASSERT_EQ(0, cluster.mon_command( + "{\"prefix\": \"osd dump\"}", + inbl, &outbl, NULL)); + string s(outbl.c_str(), outbl.length()); + if (s.find("luminous") == std::string::npos) { + cout << "cluster is not yet luminous, skipping test" << std::endl; + return; + } + } + // create object { bufferlist bl; -- 2.39.5