diff options
author | Trevor Guidry <trevor.guidry@mongodb.com> | 2023-05-09 20:27:03 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-10 00:50:45 +0000 |
commit | 5e2159ea02bdfc56de4d5998f784f70e83777e0a (patch) | |
tree | b827c74541e933687e300ab9767dcb17b3ad5ef7 /buildscripts/tests | |
parent | addfcfa8e41e903ef03cea4210f6cca7bbf068ad (diff) | |
download | mongo-5e2159ea02bdfc56de4d5998f784f70e83777e0a.tar.gz |
SERVER-72929 do not checkout old resmoke fixtures
Diffstat (limited to 'buildscripts/tests')
-rw-r--r-- | buildscripts/tests/resmokelib/testing/fixtures/test_builder.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/buildscripts/tests/resmokelib/testing/fixtures/test_builder.py b/buildscripts/tests/resmokelib/testing/fixtures/test_builder.py index 29ac90572c9..fe29b52b17c 100644 --- a/buildscripts/tests/resmokelib/testing/fixtures/test_builder.py +++ b/buildscripts/tests/resmokelib/testing/fixtures/test_builder.py @@ -1,34 +1,15 @@ """Unit tests for the resmokelib.testing.fixtures._builder module.""" # pylint: disable=protected-access,invalid-name import unittest -import filecmp -import os from unittest.mock import MagicMock from buildscripts.resmokelib import logging, parser, config from buildscripts.resmokelib.core import network from buildscripts.resmokelib.testing.fixtures import _builder as under_test -TEST_COMMIT = "1de5826097917875f48ca1ea4f2e53b40139f9ff" -TEST_SUFFIX = "_unittest_suffix" -TEST_RETRIEVE_DIR = os.path.join(under_test.RETRIEVE_DIR, TEST_SUFFIX) SET_PARAMS = "set_parameters" -class TestRetrieveFixtures(unittest.TestCase): - """Class that test retrieve_fixtures methods.""" - - def test_retrieve_fixtures(self): - """function to test retrieve_fixtures""" - expected_standalone = os.path.join("buildscripts", "tests", "resmokelib", "testing", - "fixtures", "retrieved_fixture.txt") - under_test.retrieve_fixtures(TEST_RETRIEVE_DIR, TEST_COMMIT) - retrieved_standalone = os.path.join(TEST_RETRIEVE_DIR, "standalone.py") - self.assertTrue( - filecmp.cmpfiles(retrieved_standalone, expected_standalone, - ["standalone.py", "retrieved_fixture.txt"], shallow=False)) - - class TestGetPackageName(unittest.TestCase): def test_get_package_name_from_posix_path(self): path = "build/multiversionfixtures/_unittest_suffix" @@ -49,20 +30,12 @@ class TestBuildShardedCluster(unittest.TestCase): @classmethod def setUpClass(cls): - under_test.retrieve_fixtures(TEST_RETRIEVE_DIR, TEST_COMMIT) - cls.original_constants["MULTIVERSION_CLASS_SUFFIX"] = under_test.MULTIVERSION_CLASS_SUFFIX - under_test.MULTIVERSION_CLASS_SUFFIX = TEST_SUFFIX - cls.mock_logger = MagicMock(spec=logging.Logger) logging.loggers._FIXTURE_LOGGER_REGISTRY[cls.job_num] = cls.mock_logger def tearDown(self): network.PortAllocator.reset() - @classmethod - def tearDownClass(cls): - under_test.MULTIVERSION_CLASS_SUFFIX = cls.original_constants["MULTIVERSION_CLASS_SUFFIX"] - def test_build_sharded_cluster_simple(self): parser.set_run_options() fixture_config = {"mongod_options": {SET_PARAMS: {"enableTestCommands": 1}}} |