0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/gle/1_sharding_gle_basics_passthrough.js
Siyuan Zhou ec89a420a8 SERVER-13386 Move tests with getPrevError to gle test suite
Ignore getPrevError in gle sharding test
Migrate geo_oob_sphere.js
2014-03-28 12:44:07 -04:00

44 lines
1.1 KiB
JavaScript

//
// Tests basic mongos GLE behavior
//
var passST = new ShardingTest({ name : "passST", shards : 2, mongos : 1 });
var passMongos = passST.s0;
assert.commandWorked(passMongos.getDB("admin").runCommand({ enableSharding : "testSharded" }));
// Remember the global 'db' var
var lastDB = db;
var coreTests = listFiles("jstests/gle/core");
var testsToSkip = new RegExp('[\\/\\\\](' +
'error1|' + // getPrevError not supported in sharding
'remove5|' +
'unique2|' +
'update4' +
')\.js$');
coreTests.forEach( function(file) {
// Reset global 'db' var
db = passMongos.getDB("testBasicMongosGLE");
if (testsToSkip.test(file.name)) {
print(" !!!!!!!!!!!!!!! skipping test " + file.name);
return;
}
print(" *******************************************");
print(" Test : " + file.name + " ...");
var testTime = Date.timeFunc( function() { load(file.name); }, 1);
print(" " + testTime + "ms");
});
print("Tests completed.");
// Restore 'db' var
db = lastDB;
passST.stop();