diff options
author | Brett Nawrocki <brett.nawrocki@mongodb.com> | 2022-06-27 19:26:58 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-29 16:54:43 +0000 |
commit | c007112aaebdf3e1403ee84aa356e07fa084b059 (patch) | |
tree | d43a92c78d0a337976bd29845603aa0597162b7a /src/mongo/db/s/shard_server_test_fixture.cpp | |
parent | add41e1ac8bf0dbc3be680bdc3e7d49266239e35 (diff) | |
download | mongo-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.cpp | 15 |
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 |