]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
unittest_config: $host expands to ceph_get_short_hostname(), not hostname -s 23915/head
authorSage Weil <sage@redhat.com>
Sat, 1 Sep 2018 20:56:05 +0000 (15:56 -0500)
committerSage Weil <sage@redhat.com>
Tue, 4 Sep 2018 16:26:06 +0000 (11:26 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit c7916097c207494618c56a6526cf63ff22ba64c3)
- conflict due to expand_meta changes

src/test/common/test_config.cc

index 1b8d8ac4410703b8bbc7df3bb7dda01976078ada..5bc7558a3e45385234f33116dd94bf24d4902670 100644 (file)
@@ -22,6 +22,7 @@
 #include "common/config.h"
 #include "common/errno.h"
 #include "gtest/gtest.h"
+#include "common/hostname.h"
 
 extern std::string exec(const char* cmd); // defined in test_hostname.cc
 
@@ -51,7 +52,7 @@ public:
       std::string after = " AFTER ";
       std::string val(before + "$host${host}" + after);
       EXPECT_TRUE(expand_meta(val, &oss));
-      std::string hostname = exec("hostname -s");
+      std::string hostname = ceph_get_short_hostname();
       EXPECT_EQ(before + hostname + hostname + after, val);
       EXPECT_EQ("", oss.str());
     }