summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/testing/hooks/fuzzer_restore_cluster_settings.py
blob: f1432a437dfd37adde8c7cd696fa5c5dc5d663d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""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 FuzzerRestoreClusterSettings(jsfile.JSHook):
    """Cleans up unwanted changes from fuzzer."""

    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_cluster_settings.js")
        jsfile.JSHook.__init__(self, hook_logger, fixture, js_filename, description,
                               shell_options=shell_options)