From f46a2dba14650100bd0c05320fb02bedea2e69ae Mon Sep 17 00:00:00 2001 From: Zhijian Li Date: Wed, 13 Mar 2024 06:07:08 +0800 Subject: [PATCH] Update minigraph testcases (#18321) --- src/sonic-config-engine/tests/test_minigraph_case.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index 70c5c41033..8bad0f5f35 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -528,7 +528,7 @@ class TestCfgGenCaseInsensitive(TestCase): } # TC1: Minigraph contains acl table type BmcData sample_mx_graph = os.path.join(self.test_dir,'simple-sample-graph-mx.xml') - result = minigraph.parse_xml(sample_mx_graph) + result = minigraph.parse_xml(sample_mx_graph, port_config_file=self.port_config) self.assertIn('ACL_TABLE_TYPE', result) self.assertIn('BMCDATA', result['ACL_TABLE_TYPE']) self.assertIn('BMCDATAV6', result['ACL_TABLE_TYPE']) @@ -537,7 +537,7 @@ class TestCfgGenCaseInsensitive(TestCase): self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND'], expected_acl_table_bmc_acl_northbound) self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND_V6'], expected_acl_table_bmc_acl_northbound_v6) # TC2: Minigraph doesn't contain acl table type BmcData - result = minigraph.parse_xml(self.sample_graph) + result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config) self.assertNotIn('ACL_TABLE_TYPE', result) def test_parse_device_desc_xml_mgmt_interface(self): @@ -564,7 +564,7 @@ class TestCfgGenCaseInsensitive(TestCase): mgmt_graphs = ['simple-sample-graph-mx.xml', 'simple-sample-graph-m0.xml'] for graph in mgmt_graphs: graph_path = os.path.join(self.test_dir, graph) - result = minigraph.parse_xml(graph_path) + result = minigraph.parse_xml(graph_path, port_config_file=self.port_config) self.assertIn('FLEX_COUNTER_TABLE', result) for counter in expected_mgmt_disabled_counters: self.assertIn(counter, result['FLEX_COUNTER_TABLE']) @@ -573,5 +573,5 @@ class TestCfgGenCaseInsensitive(TestCase): if counter in result['FLEX_COUNTER_TABLE']: self.assertDictEqual(result['FLEX_COUNTER_TABLE'][counter], {'FLEX_COUNTER_STATUS': 'enable'}) # TC2: For other minigraph, result should not contain FLEX_COUNTER_TABLE - result = minigraph.parse_xml(self.sample_graph) + result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config) self.assertNotIn('FLEX_COUNTER_TABLE', result)