From: Sage Weil Date: Sat, 27 May 2017 03:01:26 +0000 (-0400) Subject: ceph_test_rados_api_tier: skip redirect tests if not luminous X-Git-Tag: v12.1.0~370^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8491bc1885269dae731cf942a05d01603b5b8592;p=ceph-ci.git ceph_test_rados_api_tier: skip redirect tests if not luminous Signed-off-by: Sage Weil --- 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;