From: Loic Dachary Date: Sat, 24 May 2014 10:52:30 +0000 (+0200) Subject: os: ObjectStore::collect_metadata unit tests X-Git-Tag: v0.82~32^2^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3081652119ca9614623fcd21bdcf299f2102ed9b;p=ceph.git os: ObjectStore::collect_metadata unit tests And an emacs-executable reminder about how to run a specific test. Signed-off-by: Loic Dachary --- diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index ca9683b9385d..76c1141b4b1a 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -75,6 +75,15 @@ bool sorted(const vector &in) { return true; } +TEST_P(StoreTest, collect_metadata) { + map pm; + store->collect_metadata(&pm); + if (GetParam() == string("filestore")) { + ASSERT_NE(pm.count("filestore_backend"), 0); + ASSERT_NE(pm.count("filestore_f_type"), 0); + } +} + TEST_P(StoreTest, SimpleColTest) { coll_t cid = coll_t("initial"); int r = 0; @@ -1265,6 +1274,11 @@ int main(int argc, char **argv) { return RUN_ALL_TESTS(); } -// Local Variables: -// compile-command: "cd ../.. ; make ceph_test_objectstore ; ./ceph_test_objectstore --gtest_filter=StoreTest.* --log-to-stderr=true --debug-filestore=20" -// End: +/* + * Local Variables: + * compile-command: "cd ../.. ; make ceph_test_objectstore && + * ./ceph_test_objectstore \ + * --gtest_filter=*.collect_metadata* --log-to-stderr=true --debug-filestore=20 + * " + * End: + */