summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/testing/hooks/validate.py
blob: 20cf99c1158b4b9dcb597ccf4c87417914b21979 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""
Testing hook for verifying the consistency and integrity of collection
and index data.
"""

from __future__ import absolute_import

import os.path

from . import jsfile


class ValidateCollections(jsfile.DataConsistencyHook):
    """
    Runs full validation on all collections in all databases on every stand-alone
    node, primary replica-set node, or primary shard node.
    """

    def __init__(self, hook_logger, fixture, shell_options=None):
        description = "Full collection validation"
        js_filename = os.path.join("jstests", "hooks", "run_validate_collections.js")
        jsfile.JSHook.__init__(self, hook_logger, fixture, js_filename, description,
                               shell_options=shell_options)