def test_multiple_not_found_repeating(self): node_name_list = ["node0", "node3", "node4", "node0", "node1", "node3"] assert_report_item_list_equal( cmd_sbd._check_node_names_in_cluster(self.node_list, node_name_list), [(Severities.ERROR, report_codes.NODE_NOT_FOUND, { "node": node }) for node in ["node0", "node4"]])
def test_one_not_found(self): node_name_list = ["node0", "node3"] assert_report_item_list_equal( cmd_sbd._check_node_names_in_cluster(self.node_list, node_name_list), [(Severities.ERROR, report_codes.NODE_NOT_FOUND, { "node": "node0" })])
def test_repeating_nodes(self): node_name_list = ["node1", "node3", "node1"] self.assertEqual( [], cmd_sbd._check_node_names_in_cluster(self.node_list, node_name_list) )
def test_all_ok(self): node_name_list = ["node1", "node3"] self.assertEqual( [], cmd_sbd._check_node_names_in_cluster(self.node_list, node_name_list) )