def test_check_tranport_ls_ok(fail_state: State) -> None: assert not [ *_check_transport( False, ControllerSection( allow_legacy_pull=False, ip_allowlist=(), socket_ready=True), fail_state, ) ]
def test_check_tranport_no_tls(fail_state: State) -> None: (result, ) = _check_transport( False, ControllerSection(allow_legacy_pull=True, ip_allowlist=(), socket_ready=True), fail_state, ) assert isinstance(result, Result) assert result.state == fail_state assert result.summary == "TLS is not activated on monitored host (see details)"
def test_check_tranport_via_ssh(fail_state: State) -> None: assert [*_check_transport(True, None, fail_state) ] == [Result(state=State.OK, summary="Transport via SSH")]
def test_check_tranport_no_controller(fail_state: State) -> None: assert not [*_check_transport(False, None, fail_state)]