2020-03-18 14:19:26 -04:00
|
|
|
"""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
|
|
|
|
|
|
2020-06-17 17:41:54 +03:00
|
|
|
from buildscripts.resmokelib.testing.hooks import jsfile
|
2020-03-18 14:19:26 -04:00
|
|
|
|
|
|
|
|
|
2020-09-08 11:02:18 -04:00
|
|
|
class FuzzerRestoreSettings(jsfile.JSHook):
|
2020-03-18 14:19:26 -04:00
|
|
|
"""Cleans up unwanted changes from fuzzer."""
|
|
|
|
|
|
2021-07-29 12:53:14 -04:00
|
|
|
IS_BACKGROUND = False
|
|
|
|
|
|
2020-03-18 14:19:26 -04:00
|
|
|
def __init__(self, hook_logger, fixture, shell_options=None):
|
|
|
|
|
"""Run fuzzer cleanup."""
|
|
|
|
|
description = "Clean up unwanted changes from fuzzer"
|
2020-09-08 11:02:18 -04:00
|
|
|
js_filename = os.path.join("jstests", "hooks", "run_fuzzer_restore_settings.js")
|
2024-05-16 18:00:17 -04:00
|
|
|
jsfile.JSHook.__init__(
|
|
|
|
|
self, hook_logger, fixture, js_filename, description, shell_options=shell_options
|
|
|
|
|
)
|