2018-03-27 14:30:46 -04:00
|
|
|
"""Test hook for verifying the consistency and integrity of collection and index data."""
|
2017-06-14 20:44:52 -04:00
|
|
|
|
|
|
|
|
import os.path
|
|
|
|
|
|
2020-06-17 17:41:54 +03:00
|
|
|
from buildscripts.resmokelib.testing.hooks import jsfile
|
2017-06-14 20:44:52 -04:00
|
|
|
|
|
|
|
|
|
2021-11-02 17:21:41 +00:00
|
|
|
class ValidateCollections(jsfile.PerClusterDataConsistencyHook):
|
2018-03-27 14:30:46 -04:00
|
|
|
"""Run full validation.
|
|
|
|
|
|
|
|
|
|
This will run on all collections in all databases on every stand-alone
|
2017-06-14 20:44:52 -04:00
|
|
|
node, primary replica-set node, or primary shard node.
|
|
|
|
|
"""
|
2018-03-26 11:25:04 -04:00
|
|
|
|
2021-07-29 12:53:14 -04:00
|
|
|
IS_BACKGROUND = False
|
|
|
|
|
|
2018-03-27 14:30:46 -04:00
|
|
|
def __init__( # pylint: disable=super-init-not-called
|
|
|
|
|
self, hook_logger, fixture, shell_options=None):
|
|
|
|
|
"""Initialize ValidateCollections."""
|
2017-06-14 20:44:52 -04:00
|
|
|
description = "Full collection validation"
|
|
|
|
|
js_filename = os.path.join("jstests", "hooks", "run_validate_collections.js")
|
2018-03-27 14:30:46 -04:00
|
|
|
jsfile.JSHook.__init__( # pylint: disable=non-parent-init-called
|
|
|
|
|
self, hook_logger, fixture, js_filename, description, shell_options=shell_options)
|