From e3d0b0ae8c49829b92c22aff1799c00683c002c1 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 7 Jan 2014 16:49:44 +0100 Subject: [PATCH] common: fix large output in unittest_daemon_config All tests in daemon_config use the global g_ceph_context object. Introducing an expansion loop in it will impact all tests and generate a very large output. Remove the SubstitutionLoop test case which is also covered in test/common/test_config.cc. Signed-off-by: Loic Dachary --- src/test/daemon_config.cc | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/test/daemon_config.cc b/src/test/daemon_config.cc index 54b334edf500b..3e6dc4927e8b8 100644 --- a/src/test/daemon_config.cc +++ b/src/test/daemon_config.cc @@ -101,26 +101,6 @@ TEST(DaemonConfig, SubstitutionBracesTrailing) { ASSERT_EQ(string("barfoo"), string(buf)); } -TEST(DaemonConfig, SubstitutionLoop) { - int ret; - ret = g_ceph_context->_conf->set_val("internal_safe_to_start_threads", "false"); - ret = g_ceph_context->_conf->set_val("host", "foo$public_network", false); - ASSERT_EQ(ret, 0); - ret = g_ceph_context->_conf->set_val("public_network", "bar$host", false); - ASSERT_EQ(ret, 0); - g_ceph_context->_conf->apply_changes(NULL); - char buf[128], buf2[128]; - memset(buf, 0, sizeof(buf)); - memset(buf2, 0, sizeof(buf2)); - char *tmp = buf; - char *tmp2 = buf; - ret = g_ceph_context->_conf->get_val("host", &tmp, sizeof(buf)); - ASSERT_EQ(ret, 0); - ret = g_ceph_context->_conf->get_val("public_network", &tmp2, sizeof(buf)); - ASSERT_EQ(ret, 0); - ASSERT_TRUE(strchr(buf, '$') || strchr(buf2, '$')); -} - // config: variable substitution happen only once http://tracker.ceph.com/issues/7103 TEST(DaemonConfig, SubstitutionMultiple) { int ret; -- 2.39.5