diff options
author | Randolph Tan <randolph@10gen.com> | 2015-04-10 18:06:07 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2015-05-15 10:11:31 -0400 |
commit | 280fbae9044af29bc63068dbe9c4e7846e9e6517 (patch) | |
tree | 96b6490b5aa9d8ad0facd9356367ecd5f3534a8d /jstests/sharding/shard_with_special_db_names.js | |
parent | f3d242c808ec6c1b7145dd3f084da438829552cb (diff) | |
download | mongo-280fbae9044af29bc63068dbe9c4e7846e9e6517.tar.gz |
SERVER-18044 Make sharding test explicitly set primary shards for databases
Diffstat (limited to 'jstests/sharding/shard_with_special_db_names.js')
-rw-r--r-- | jstests/sharding/shard_with_special_db_names.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jstests/sharding/shard_with_special_db_names.js b/jstests/sharding/shard_with_special_db_names.js index 7277abac580..2887f364743 100644 --- a/jstests/sharding/shard_with_special_db_names.js +++ b/jstests/sharding/shard_with_special_db_names.js @@ -5,11 +5,13 @@ var specialDB = "[a-z]+"; var specialNS = specialDB + ".special"; s.adminCommand( { enablesharding : "test" } ); +s.ensurePrimaryShard('test', 'shard0001'); s.adminCommand( { shardcollection : "test.data" , key : { num : 1 } } ); // Test that the database will not complain "cannot have 2 database names that // differs on case" s.adminCommand( { enablesharding : specialDB } ); +s.ensurePrimaryShard(specialDB, 'shard0000'); s.adminCommand( { shardcollection : specialNS, key : { num : 1 } } ); var exists = s.getDB("config").collections.find( { _id: specialNS } ).count(); |