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

align check_wal_files() code with it's test case #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 29, 2021

  1. align check_wal_files() code with it's test case

    Test 02_wal_files.t may fail against a newly created (by the framework
    in CP_Testing.pm) database (PostgreSQL 13) with
    
    :   Failed test 'Action 'wal_files' works as expected for warnings'
    :   at t/02_wal_files.t line 44.
    :                   'POSTGRES_WAL_FILES OK: DB "postgres" (host:/tmp/cptesting_socket) WAL files found: 1 | time=0.01s files=1;1
    : '
    :     doesn't match '(?^:^POSTGRES_WAL_FILES WARNING)'
    
    as there is exactly one WAL file and the test expects the check to raise
    warning/critical alerts at one WAL file - just as the documentation of
    the alert levels says "the threshold at wich a warning/critical alert is
    fired", but the code in check_wal_files() checks if the number of files
    is _greater_ than the alerting threshold. Admitted that this is a corner
    case, but it is annoying af when running the tests.
    Fix by converting the greater '>' into 'greater-or-equal' '>=' checks.
    moench-tegeder committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    cfb78b4 View commit details
    Browse the repository at this point in the history