mongo/buildscripts/resmokelib/testing/hooks/fuzzer_restore_settings.py
Steve McClure b4b23946cd SERVER-90570: Enable formatting checks for buildscripts directory, excluding idl (#22254)
GitOrigin-RevId: 9d997a9f44cd43a8dec7c2a17fa2dbcd875e92f6
2024-05-16 22:07:36 +00:00

24 lines
766 B
Python

"""Test hook for resetting the server in a sane state.
The main use case is to ensure that other hooks that will run against the server will not
encounter unexpected failures.
"""
import os.path
from buildscripts.resmokelib.testing.hooks import jsfile
class FuzzerRestoreSettings(jsfile.JSHook):
"""Cleans up unwanted changes from fuzzer."""
IS_BACKGROUND = False
def __init__(self, hook_logger, fixture, shell_options=None):
"""Run fuzzer cleanup."""
description = "Clean up unwanted changes from fuzzer"
js_filename = os.path.join("jstests", "hooks", "run_fuzzer_restore_settings.js")
jsfile.JSHook.__init__(
self, hook_logger, fixture, js_filename, description, shell_options=shell_options
)