summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/shard_server_test_fixture.cpp
diff options
context:
space:
mode:
authorBrett Nawrocki <brett.nawrocki@mongodb.com>2022-06-27 19:26:58 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-29 16:54:43 +0000
commitc007112aaebdf3e1403ee84aa356e07fa084b059 (patch)
treed43a92c78d0a337976bd29845603aa0597162b7a /src/mongo/db/s/shard_server_test_fixture.cpp
parentadd41e1ac8bf0dbc3be680bdc3e7d49266239e35 (diff)
downloadmongo-c007112aaebdf3e1403ee84aa356e07fa084b059.tar.gz
SERVER-58983 Reanimate ReshardingCollectionClonerTest
Diffstat (limited to 'src/mongo/db/s/shard_server_test_fixture.cpp')
-rw-r--r--src/mongo/db/s/shard_server_test_fixture.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mongo/db/s/shard_server_test_fixture.cpp b/src/mongo/db/s/shard_server_test_fixture.cpp
index fe4de75a820..0567bd0fb26 100644
--- a/src/mongo/db/s/shard_server_test_fixture.cpp
+++ b/src/mongo/db/s/shard_server_test_fixture.cpp
@@ -94,4 +94,19 @@ std::unique_ptr<ShardingCatalogClient> ShardServerTestFixture::makeShardingCatal
return std::make_unique<ShardingCatalogClientImpl>();
}
+void ShardServerTestFixtureWithCatalogCacheMock::setUp() {
+ auto loader = std::make_unique<CatalogCacheLoaderMock>();
+ _cacheLoaderMock = loader.get();
+ setCatalogCacheLoader(std::move(loader));
+ ShardServerTestFixture::setUp();
+}
+
+std::unique_ptr<CatalogCache> ShardServerTestFixtureWithCatalogCacheMock::makeCatalogCache() {
+ return std::make_unique<CatalogCacheMock>(getServiceContext(), *_cacheLoaderMock);
+}
+
+CatalogCacheMock* ShardServerTestFixtureWithCatalogCacheMock::getCatalogCacheMock() {
+ return static_cast<CatalogCacheMock*>(catalogCache());
+}
+
} // namespace mongo