forked from mongodb/mongo
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SERVER-14231 Added sharding support to multiversion dumprestore test
- Loading branch information
Showing
5 changed files
with
383 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// dumprestore_24_direct.js | ||
|
||
load( './jstests/multiVersion/libs/dumprestore_helpers.js' ) | ||
|
||
|
||
// The base name to use for various things in the test, including the dbpath and the database name | ||
var testBaseName = "jstests_tool_dumprestore_24_direct"; | ||
|
||
// Paths to external directories to be used to store dump files | ||
var dumpDir = MongoRunner.dataPath + testBaseName + "_dump_external/"; | ||
var testDbpath = MongoRunner.dataPath + testBaseName + "_dbpath_external/"; | ||
|
||
|
||
|
||
// Test dumping directly from data files across versions | ||
var directDumpTests = { | ||
'serverSourceVersion' : [ "latest", "2.4" ], | ||
'serverDestVersion' :[ "latest", "2.4" ], | ||
'mongoDumpVersion' :[ "latest", "2.4" ], | ||
'mongoRestoreVersion' :[ "latest", "2.4" ], | ||
'dumpDir' : [ dumpDir ], | ||
'testDbpath' : [ testDbpath ], | ||
'dumpType' : [ "direct" ], | ||
'restoreType' : [ "mongod" ] | ||
}; | ||
runAllDumpRestoreTests(directDumpTests); | ||
|
||
|
||
|
||
// Test restoring directly to data files across versions | ||
var directRestoreTests = { | ||
'serverSourceVersion' : [ "latest", "2.4" ], | ||
'serverDestVersion' :[ "latest", "2.4" ], | ||
'mongoDumpVersion' :[ "latest", "2.4" ], | ||
'mongoRestoreVersion' :[ "latest", "2.4" ], | ||
'dumpDir' : [ dumpDir ], | ||
'testDbpath' : [ testDbpath ], | ||
'dumpType' : [ "mongod" ], | ||
'restoreType' : [ "direct" ] | ||
}; | ||
runAllDumpRestoreTests(directRestoreTests); | ||
|
||
|
||
|
||
print("dumprestore_24_direct success!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// dumprestore_24_sharded.js | ||
|
||
load( './jstests/multiVersion/libs/dumprestore_helpers.js' ) | ||
|
||
|
||
// The base name to use for various things in the test, including the dbpath and the database name | ||
var testBaseName = "jstests_tool_dumprestore_24_sharded"; | ||
|
||
// Paths to external directories to be used to store dump files | ||
var dumpDir = MongoRunner.dataPath + testBaseName + "_dump_external/"; | ||
var testDbpath = MongoRunner.dataPath + testBaseName + "_dbpath_external/"; | ||
|
||
|
||
|
||
// Test dumping from a sharded cluster across versions | ||
var shardedDumpTests = { | ||
'serverSourceVersion' : [ "latest", "2.4" ], | ||
'serverDestVersion' :[ "latest", "2.4" ], | ||
'mongoDumpVersion' :[ "latest", "2.4" ], | ||
'mongoRestoreVersion' :[ "latest", "2.4" ], | ||
'dumpDir' : [ dumpDir ], | ||
'testDbpath' : [ testDbpath ], | ||
'dumpType' : [ "mongos" ], | ||
'restoreType' : [ "mongod" ] | ||
}; | ||
runAllDumpRestoreTests(shardedDumpTests); | ||
|
||
|
||
|
||
// Test restoring to a sharded cluster across versions | ||
var shardedRestoreTests = { | ||
'serverSourceVersion' : [ "latest", "2.4" ], | ||
'serverDestVersion' :[ "latest", "2.4" ], | ||
'mongoDumpVersion' :[ "latest", "2.4" ], | ||
'mongoRestoreVersion' :[ "latest", "2.4" ], | ||
'dumpDir' : [ dumpDir ], | ||
'testDbpath' : [ testDbpath ], | ||
'dumpType' : [ "mongod" ], | ||
'restoreType' : [ "mongos" ] | ||
}; | ||
runAllDumpRestoreTests(shardedRestoreTests); | ||
|
||
|
||
|
||
print("dumprestore_24_sharded success!"); |
Oops, something went wrong.