]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_rados_api_tier: skip redirect tests if not luminous 15325/head
authorSage Weil <sage@redhat.com>
Sat, 27 May 2017 03:01:26 +0000 (23:01 -0400)
committerSage Weil <sage@redhat.com>
Sat, 27 May 2017 03:01:26 +0000 (23:01 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/test/librados/tier.cc

index a7a5995dfd75d4c9fecd93926ecb2845c857d668..1296acd0b75aea2d3b9c987d9ffcfe7badb8e54b 100755 (executable)
@@ -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;