diff options
author | Aran85 <zhangzengran@h3c.com> | 2015-08-06 11:45:43 +0200 |
---|---|---|
committer | Aran85 <zhangzengran@h3c.com> | 2015-08-06 11:49:58 +0200 |
commit | b34363ac0fd40e2d1a2b311e566f3db5e2f30da8 (patch) | |
tree | 576b8d865cd019ee09b5d03fe8657eb642f495ef /src/test/crush/CrushWrapper.cc | |
parent | Merge pull request #4394 from majianpeng/tools-copyget-flags (diff) | |
download | ceph-b34363ac0fd40e2d1a2b311e566f3db5e2f30da8.tar.xz ceph-b34363ac0fd40e2d1a2b311e566f3db5e2f30da8.zip |
cleanup: fix the eol dumping in JSONFormatter flush & close_section
Signed-off-by: Aran85 zhangzengran@h3c.com
Diffstat (limited to 'src/test/crush/CrushWrapper.cc')
-rw-r--r-- | src/test/crush/CrushWrapper.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/crush/CrushWrapper.cc b/src/test/crush/CrushWrapper.cc index c690ada4f16..bbf40ec6d63 100644 --- a/src/test/crush/CrushWrapper.cc +++ b/src/test/crush/CrushWrapper.cc @@ -686,11 +686,13 @@ TEST(CrushWrapper, dump_rules) { // no ruleset by default { Formatter *f = Formatter::create("json-pretty"); + f->open_array_section("rules"); c->dump_rules(f); + f->close_section(); stringstream ss; f->flush(ss); delete f; - EXPECT_EQ("\n", ss.str()); + EXPECT_EQ("[]\n", ss.str()); } string name("NAME"); |