Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to exclude sources, checks and/or keys from results #228

Merged
merged 4 commits into from
Feb 4, 2022

Commits on Feb 1, 2022

  1. Add a way to exclude sources, checks and/or keys from results

    We allow to exclude on three different levels:
    
     * source
     * check
     * key
    
    Excluding a source could be used to disable a misbehaving set of
    checks, particularly one not provided by upstream. A check would
    be similar.
    
    Not all results have a key but most do. If we run into corner
    cases we can address them as they come up.
    
    The example I had in mind is an untracked certificate that is
    otherwise legitimate. This could be marked as excluded by key
    so ipa-healthcheck will no longer return failures.
    
    Filtering happens twice. Any sources or checks excluded will simply
    not be executed. keys are excluded after execution.
    
    This adds new section, [exclusions], which will contain three types
    of exclusions and can be repeated:
    
    source
    config
    key
    
    freeipa#176
    
    Signed-off-by: Rob Crittenden <rcritten@redhat.com>
    rcritten committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    940ceb0 View commit details
    Browse the repository at this point in the history
  2. Add keys to some Results that were missing

    Being able to suppress a specific key rather than a whole
    source or check is better.
    
    I'm not ready yet to assert that there is a key in each
    Result since that would be a rather impactful change but
    for the purposes of this change I added an assert and ran
    it through the unit tests.
    
    freeipa#176
    
    Signed-off-by: Rob Crittenden <rcritten@redhat.com>
    rcritten committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    8fc9d01 View commit details
    Browse the repository at this point in the history
  3. Test suppressing results

    Create a new source and register two plugins to it.
    
    Use an Output plugin to collect the results in a global
    variable so the results can be evaluated after the run is
    complete.
    
    Use a temporary configuration file to set the test
    configuration.
    
    Test suppressing:
    
    - nothing
    - the source
    - one check
    - one key
    
    Signed-off-by: Rob Crittenden <rcritten@redhat.com>
    
    freeipa#176
    rcritten committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    12a74ed View commit details
    Browse the repository at this point in the history
  4. Update timeout test to use new API in run_plugins

    A config option was added which needs to be passed in during
    the test call.
    
    Signed-off-by: Rob Crittenden <rcritten@redhat.com>
    rcritten committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    56029bf View commit details
    Browse the repository at this point in the history