summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/testing/fixtures/fixturelib.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/resmokelib/testing/fixtures/fixturelib.py')
-rw-r--r--buildscripts/resmokelib/testing/fixtures/fixturelib.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/buildscripts/resmokelib/testing/fixtures/fixturelib.py b/buildscripts/resmokelib/testing/fixtures/fixturelib.py
index 7ce01b6cbee..e163340f3a6 100644
--- a/buildscripts/resmokelib/testing/fixtures/fixturelib.py
+++ b/buildscripts/resmokelib/testing/fixtures/fixturelib.py
@@ -5,8 +5,9 @@ from buildscripts.resmokelib import core
from buildscripts.resmokelib import errors
from buildscripts.resmokelib import utils
from buildscripts.resmokelib import logging
+from buildscripts.resmokelib.core import network
from buildscripts.resmokelib.utils.history import make_historic as _make_historic
-from buildscripts.resmokelib.testing.fixtures import interface
+from buildscripts.resmokelib.testing.fixtures import _builder
from buildscripts.resmokelib.multiversionconstants import LAST_LTS_MONGOD_BINARY, LAST_LTS_MONGOS_BINARY
@@ -39,6 +40,10 @@ class FixtureLib(object):
# Programs #
############
+ def make_fixture(self, class_name, logger, job_num, *args, **kwargs):
+ """Build fixtures by calling builder API."""
+ return _builder.make_fixture(class_name, logger, job_num, *args, **kwargs)
+
def mongod_program(self, logger, job_num, executable, process_kwargs, mongod_options): # pylint: disable=too-many-arguments
"""
Return a Process instance that starts mongod arguments constructed from 'mongod_options'.
@@ -86,6 +91,10 @@ class FixtureLib(object):
"""Return an objects whose attributes are fixture config values."""
return _FixtureConfig()
+ def get_next_port(self, job_num):
+ """Return the next available port that fixture can use."""
+ return network.PortAllocator.next_fixture_port(job_num)
+
class _FixtureConfig(object): # pylint: disable=too-many-instance-attributes
"""Class that stores fixture configuration info."""
@@ -120,3 +129,6 @@ class _FixtureConfig(object): # pylint: disable=too-many-instance-attributes
self.MONGOS_SET_PARAMETERS = config.MONGOS_SET_PARAMETERS
self.DBPATH_PREFIX = config.DBPATH_PREFIX
self.DEFAULT_DBPATH_PREFIX = config.DEFAULT_DBPATH_PREFIX
+ # Config servers have to be upgraded first. We hardcode the value here since there's
+ # no way to set it on the command line.
+ self.CONFIG_SVR_MIXED_BIN_VERSIONS = ["new", "new"]