Files
mongo/buildscripts/resmokelib/testing/testcases/magic_restore_js_test.py
seanzimm 49aec070b5 SERVER-89647 Override drop and assert for magic restore testing (#22460)
GitOrigin-RevId: 34a2d0d2e06953c39c6c10d872cb640100256927
2024-05-22 21:41:52 +00:00

35 lines
1.1 KiB
Python

"""The unittest.TestCase to run tests in a try/catch block."""
import hashlib
import threading
from buildscripts.resmokelib.testing.testcases import interface
from buildscripts.resmokelib.testing.testcases import jsrunnerfile
class MagicRestoreTestCase(jsrunnerfile.JSRunnerFileTestCase):
"""A test to execute for running tests in a try/catch block."""
REGISTERED_NAME = "magic_restore_js_test"
def __init__(self, logger, js_filenames: list[str], shell_executable=None, shell_options=None):
"""Initialize the MagicRestoreTestCase."""
assert len(js_filenames) == 1
jsrunnerfile.JSRunnerFileTestCase.__init__(
self,
logger,
"MagicRestore Test",
js_filenames[0],
test_runner_file="jstests/libs/magic_restore_passthrough_runner.js",
shell_executable=shell_executable,
shell_options=shell_options,
)
@property
def js_filename(self):
"""Return the name of the test file."""
return self.test_name
def _populate_test_data(self, test_data):
test_data["jsTestFile"] = self.js_filename