summaryrefslogtreecommitdiff
path: root/src/mongo/s/config_server_test_fixture.h
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2017-05-12 17:15:19 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2017-06-21 09:02:07 -0400
commit7e5ab840e8aa7627d5969ca53ee46d3fb615bc6a (patch)
tree43e5c1bcfd6ed0b5962dfd5911adc6d3116a6709 /src/mongo/s/config_server_test_fixture.h
parent5dd64f88d2b66078c957eea5a7889076ee5956b6 (diff)
downloadmongo-7e5ab840e8aa7627d5969ca53ee46d3fb615bc6a.tar.gz
SERVER-29107 move shardCollection logic into new _configsvrShardCollection command on config server
Diffstat (limited to 'src/mongo/s/config_server_test_fixture.h')
-rw-r--r--src/mongo/s/config_server_test_fixture.h18
1 files changed, 18 insertions, 0 deletions
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 <typename T>
@@ -91,11 +93,27 @@ public:
StatusWith<ChunkType> 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<std::vector<BSONObj>> 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<ChunkVersion> expectedChunkVersion);
+
+ /**
* Returns the stored raw pointer to the addShard TaskExecutor's NetworkInterface.
*/
executor::NetworkInterfaceMock* networkForAddShard() const;