eden/fs/store/hg/test/HgImportErrorsTest.cpp
// A simple sanity test to ensure the fake_hg_import_helper.py script
// works as expected when returning successful responses.
A simple sanity test to ensure the fake_hg_import_helper.py script
works as expected when returning successful responses.
A simple sanity test to ensure the fake_hg_import_helper . py script works as expected when returning successful responses .
TEST_F(HgImportErrorTest, testNoErrors) {
  defineBlob("foo/abc.c", makeTestHash("5678"), "abc.c v 5678");
  defineBlob("foo/bar.txt", makeTestHash("1234"), "bar.txt v 1234");
  defineManifest(
      makeTestHash("abcdef"),
      {
          ManifestEntry("foo/abc.c", "", makeTestHash("5678")),
          ManifestEntry("foo/bar.txt", "", makeTestHash("1234")),
      });
  createStore();
  auto rootTree =
      objectStore_->getTreeForCommit(makeTestHash("abcdef")).get(kTimeout);
  auto fooEntry = rootTree->getEntryPtr("foo"_pc);
  ASSERT_TRUE(fooEntry);
  auto fooTree = objectStore_->getTree(fooEntry->getHash()).get(kTimeout);
  auto barEntry = fooTree->getEntryPtr("bar.txt"_pc);
  ASSERT_TRUE(barEntry);
  auto bar = objectStore_->getBlob(barEntry->getHash()).get(kTimeout);
  EXPECT_BLOB_EQ(bar, "bar.txt v 1234");
}
TEST_F ( HgImportErrorTest , testNoErrors ) { defineBlob ( " " , makeTestHash ( " " ) , " " ) ; defineBlob ( " " , makeTestHash ( " " ) , " " ) ; defineManifest ( makeTestHash ( " " ) , { ManifestEntry ( " " , " " , makeTestHash ( " " ) ) , ManifestEntry ( " " , " " , makeTestHash ( " " ) ) , } ) ; createStore ( ) ; auto rootTree = objectStore_ -> getTreeForCommit ( makeTestHash ( " " ) ) . get ( kTimeout ) ; auto fooEntry = rootTree -> getEntryPtr ( " " _pc ) ; ASSERT_TRUE ( fooEntry ) ; auto fooTree = objectStore_ -> getTree ( fooEntry -> getHash ( ) ) . get ( kTimeout ) ; auto barEntry = fooTree -> getEntryPtr ( " " _pc ) ; ASSERT_TRUE ( barEntry ) ; auto bar = objectStore_ -> getBlob ( barEntry -> getHash ( ) ) . get ( kTimeout ) ; EXPECT_BLOB_EQ ( bar , " " ) ; }
A simple sanity test to ensure the fake_hg_import_helper.py script
works as expected when returning successful responses.
A simple sanity test to ensure the fake_hg_import_helper . py script works as expected when returning successful responses .