def test_cluster_check_veritas_vcs_resource(): SECTION["resource"]["lan_phantom"] = [Vcs(attr="State", value="OFFLINE", cluster="minions")] third_section: veritas_vcs.Section = { "resource": {"lan_phantom": [Vcs(attr="State", value="OFFLINE", cluster="minions")]} } assert list( veritas_vcs.cluster_check_veritas_vcs_resource( "lan_phantom", PARAMS, { "node1": SECTION, "node2": SECTION_HASHES, "node3": third_section, }, ) ) == [ Result(state=state.OK, summary="All nodes OK"), Result( state=state.OK, notice="[node1]: offline, [node2]: online, [node3]: offline", ), Result( state=state.OK, summary="cluster: minions", ), ] del SECTION["resource"]["lan_phantom"]
def test_cluster_check_veritas_vcs_resource(): SECTION['resource']['lan_phantom'] = [Vcs(attr='State', value='OFFLINE', cluster='minions')] third_section: veritas_vcs.Section = { 'resource': { 'lan_phantom': [Vcs(attr='State', value='OFFLINE', cluster='minions')] } } assert list( veritas_vcs.cluster_check_veritas_vcs_resource( 'lan_phantom', PARAMS, { 'node1': SECTION, 'node2': SECTION_HASHES, 'node3': third_section, }, )) == [ Result( state=state.WARN, summary='[node1]: offline', ), Result( state=state.OK, notice='[node2]: online', ), Result( state=state.WARN, summary='[node3]: offline', ), Result( state=state.OK, summary='cluster: minions', ), ] del SECTION['resource']['lan_phantom']