mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
implement 'test-packages --disable-oplog'
This commit is contained in:
@@ -1120,6 +1120,10 @@ Fiber(function () {
|
||||
.boolean('production')
|
||||
.describe('production', 'Run in production mode. Minify and bundle CSS and JS files.')
|
||||
.boolean('once') // See #Once
|
||||
// To ensure that QA covers both PollingObserveDriver and
|
||||
// OplogObserveDriver, this option disables oplog for tests.
|
||||
// (It still creates a replset, it just doesn't do oplog tailing.)
|
||||
.boolean('disable-oplog')
|
||||
.describe('settings', 'Set optional data for Meteor.settings on the server')
|
||||
.usage(
|
||||
"Usage: meteor test-packages [--release <release>] [options] [package...]\n" +
|
||||
@@ -1201,6 +1205,7 @@ Fiber(function () {
|
||||
port: argv.port,
|
||||
minify: argv.production,
|
||||
once: argv.once,
|
||||
disableOplog: argv['disable-oplog'],
|
||||
testPackages: testPackages,
|
||||
settingsFile: argv.settings,
|
||||
banner: "Tests"
|
||||
|
||||
12
tools/run.js
12
tools/run.js
@@ -243,7 +243,8 @@ var startServer = function (options) {
|
||||
|
||||
env.PORT = options.innerPort;
|
||||
env.MONGO_URL = options.mongoUrl;
|
||||
env.MONGO_OPLOG_URL = options.oplogUrl;
|
||||
if (options.oplogUrl)
|
||||
env.MONGO_OPLOG_URL = options.oplogUrl;
|
||||
env.ROOT_URL = options.rootUrl;
|
||||
if (options.settings)
|
||||
env.METEOR_SETTINGS = options.settings;
|
||||
@@ -417,9 +418,12 @@ exports.run = function (context, options) {
|
||||
// Allow people to specify an MONGO_OPLOG_URL override. If someone specifies a
|
||||
// MONGO_URL but not an MONGO_OPLOG_URL, disable the oplog. If neither is
|
||||
// specified, use the default internal mongo oplog.
|
||||
var oplogUrl = process.env.MONGO_OPLOG_URL ||
|
||||
(process.env.MONGO_URL ? undefined
|
||||
: "mongodb://127.0.0.1:" + mongoPort + "/local");
|
||||
var oplogUrl = undefined;
|
||||
if (!options.disableOplog) {
|
||||
oplogUrl = process.env.MONGO_OPLOG_URL ||
|
||||
(process.env.MONGO_URL ? undefined
|
||||
: "mongodb://127.0.0.1:" + mongoPort + "/local");
|
||||
}
|
||||
var firstRun = true;
|
||||
|
||||
var serverHandle;
|
||||
|
||||
Reference in New Issue
Block a user