From 7e5ab840e8aa7627d5969ca53ee46d3fb615bc6a Mon Sep 17 00:00:00 2001 From: Esha Maharishi Date: Fri, 12 May 2017 17:15:19 -0400 Subject: SERVER-29107 move shardCollection logic into new _configsvrShardCollection command on config server --- src/mongo/s/config_server_test_fixture.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mongo/s/config_server_test_fixture.h') diff --git a/src/mongo/s/config_server_test_fixture.h b/src/mongo/s/config_server_test_fixture.h index 9eeb0fa7398..790902664cb 100644 --- a/src/mongo/s/config_server_test_fixture.h +++ b/src/mongo/s/config_server_test_fixture.h @@ -34,11 +34,13 @@ namespace mongo { class BSONObj; class ChunkType; +struct ChunkVersion; class KeysCollectionDocument; class NamespaceString; class Shard; class ShardingCatalogClient; class ShardingCatalogManager; +class ShardId; class ShardRegistry; class ShardType; template @@ -90,11 +92,27 @@ public: */ StatusWith getChunkDoc(OperationContext* opCtx, const BSONObj& minKey); + /** + * Inserts a document for the database into the config.databases collection. + */ + void setupDatabase(const std::string& dbName, const ShardId primaryShard, const bool sharded); + /** * Returns the indexes definitions defined on a given collection. */ StatusWith> getIndexes(OperationContext* opCtx, const NamespaceString& ns); + /** + * Expects a setShardVersion command to be executed on the specified shard. + * + * The expectedChunkVersion is optional, because in some cases it may not be possible to know + * the OID of a ChunkVersion generated by some internal code. (See SERVER-29451). + */ + void expectSetShardVersion(const HostAndPort& expectedHost, + const ShardType& expectedShard, + const NamespaceString& expectedNs, + boost::optional expectedChunkVersion); + /** * Returns the stored raw pointer to the addShard TaskExecutor's NetworkInterface. */ -- cgit v1.2.1