diff options
author | Eliot Horowitz <eliot@10gen.com> | 2014-07-24 15:19:02 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2014-07-28 08:43:19 -0400 |
commit | 6d2e9273bbb3127a00063fbee6cf089b8fc1687a (patch) | |
tree | 06856b4268ab546213972890cf911a4d9ef55437 | |
parent | 03048e3ab4989342876e265eb3bde5d18aacb2a5 (diff) | |
download | mongo-6d2e9273bbb3127a00063fbee6cf089b8fc1687a.tar.gz |
SERVER-13635: allow smoke.py to use alternate storage engines
-rwxr-xr-x | buildscripts/smoke.py | 12 | ||||
-rw-r--r-- | jstests/core/apitest_db.js | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index 4472e07f12b..3a40f6d1e69 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -206,6 +206,8 @@ class mongod(NullMongod): argv += ['--setParameter', 'enableTestCommands=1', '--httpinterface'] if self.kwargs.get('small_oplog'): argv += ["--master", "--oplogSize", "511"] + if self.kwargs.get('storage_engine'): + argv += ["--storageEngine", self.kwargs.get('storage_engine')] params = self.kwargs.get('set_parameters', None) if params: for p in params.split(','): argv += ['--setParameter', p] @@ -638,6 +640,7 @@ def run_tests(tests): master = mongod(small_oplog_rs=small_oplog_rs, small_oplog=small_oplog, no_journal=no_journal, + storage_engine=storage_engine, set_parameters=set_parameters, no_preallocj=no_preallocj, auth=auth, @@ -655,6 +658,7 @@ def run_tests(tests): small_oplog_rs=small_oplog_rs, small_oplog=small_oplog, no_journal=no_journal, + storage_engine=storage_engine, set_parameters=set_parameters, no_preallocj=no_preallocj, auth=auth, @@ -721,6 +725,7 @@ def run_tests(tests): master = mongod(small_oplog_rs=small_oplog_rs, small_oplog=small_oplog, no_journal=no_journal, + storage_engine=storage_engine, set_parameters=set_parameters, no_preallocj=no_preallocj, auth=auth, @@ -987,7 +992,7 @@ def add_exe(e): def set_globals(options, tests): global mongod_executable, mongod_port, shell_executable, continue_on_failure global small_oplog, small_oplog_rs - global no_journal, set_parameters, set_parameters_mongos, no_preallocj + global no_journal, set_parameters, set_parameters_mongos, no_preallocj, storage_engine global auth, authMechanism, keyFile, keyFileData, smoke_db_prefix, test_path, start_mongod global use_ssl, use_x509 global file_of_commands_mode @@ -1021,6 +1026,7 @@ def set_globals(options, tests): if hasattr(options, "small_oplog_rs"): small_oplog_rs = options.small_oplog_rs no_journal = options.no_journal + storage_engine = options.storage_engine set_parameters = options.set_parameters set_parameters_mongos = options.set_parameters_mongos no_preallocj = options.no_preallocj @@ -1135,7 +1141,7 @@ def add_to_failfile(tests, options): def main(): global mongod_executable, mongod_port, shell_executable, continue_on_failure, small_oplog - global no_journal, set_parameters, set_parameters_mongos, no_preallocj, auth + global no_journal, set_parameters, set_parameters_mongos, no_preallocj, auth, storage_engine global keyFile, smoke_db_prefix, test_path, use_write_commands parser = OptionParser(usage="usage: smoke.py [OPTIONS] ARGS*") @@ -1166,6 +1172,8 @@ def main(): parser.add_option('--small-oplog-rs', dest='small_oplog_rs', default=False, action="store_true", help='Run tests with replica set replication & use a small oplog') + parser.add_option('--storageEngine', dest='storage_engine', default=None, + help='What storage engine to start mongod with') parser.add_option('--nojournal', dest='no_journal', default=False, action="store_true", help='Do not turn on journaling in tests') diff --git a/jstests/core/apitest_db.js b/jstests/core/apitest_db.js index c734d67bba7..6d4b0478a33 100644 --- a/jstests/core/apitest_db.js +++ b/jstests/core/apitest_db.js @@ -29,13 +29,13 @@ dd( "c" ); */ db.getCollection( "test" ).drop(); -db.getCollection( "system.namespaces" ).find().forEach( function(x) { assert(x.name != "test.test"); }); +db.getCollectionNames().forEach( function(x) { assert(x != "test"); }); dd( "d" ); db.createCollection("test"); var found = false; -db.getCollection( "system.namespaces" ).find().forEach( function(x) { if (x.name == "test.test") found = true; }); +db.getCollectionNames().forEach( function(x) { if (x == "test") found = true; }); assert(found, "found test.test in system.namespaces"); dd( "e" ); |