Example #1
0
def test_check_warn_auto_shrink(section):

    assert list(check_mssql_databases("MSSQL_MSSQL46 NOC_ALARM_T", Parameters({}), section)) == [
        Result(state=state.OK, summary="Status: ONLINE"),
        Result(state=state.OK, summary="Recovery: FULL"),
        Result(state=state.OK, summary="Auto close: off"),
        Result(state=state.WARN, summary="Auto shrink: on"),
    ]
Example #2
0
def test_check_error(section):

    assert list(check_mssql_databases("MSSQL_Mouse -", Parameters(
        {}), section)) == [
            Result(state=state.CRIT, summary="We are out of cheese!"),
        ]