Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sonic-config-engine] Fix unit test case minigraph_acl failure. #9305

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sonic-config-engine/tests/test_cfggen.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def test_template_json_batch_mode(self):
# more robust by adding better parsing logic.
def test_minigraph_acl(self):
argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v ACL_TABLE'
output = self.run_script(argument, True, True)
output = self.run_script(argument)
self.assertEqual(
utils.to_dict(output.strip().replace("Warning: Ignoring Control Plane ACL NTP_ACL without type\n", '')),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think there is reason why such warning is checked. better not to remove this. what else warning are we seeing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @lguohan comments. I was able to verify it without removing that line #206. Just the below line should work i believe.

  •    output = self.run_script(argument)
    

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked other test cases. No one else checked warning output.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am not fully convinced that we can ignore the warning here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ grep run_script src/sonic-config-engine/tests/ -rn
src/sonic-config-engine/tests/test_cfggen.py:50: def run_script(self, argument, check_stderr=False, verbose=False):
src/sonic-config-engine/tests/test_cfggen.py:71: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:76: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:81: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:86: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:91: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:96: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:101: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:106: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:111: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:116: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:123: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:128: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:133: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:138: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:145: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:169: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:174: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:182: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:196: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:206: output = self.run_script(argument, True, True)
src/sonic-config-engine/tests/test_cfggen.py:225:# output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:230: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:238: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:244: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:259: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:284: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:289: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:299: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:307: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:317: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:325: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:333: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:341: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:349: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:360: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:374: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:383: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:392: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:433: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:474: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:482: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:490: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:498: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:504: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:510: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:518: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:561: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:604: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:647:# output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:652: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:660: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:666: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:672: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:677: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:685: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:693: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:729: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:747: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:752: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:766: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:806: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:811: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:816: output = json.loads(self.run_script(argument))
src/sonic-config-engine/tests/test_cfggen.py:825: json.loads(self.run_script(argument)),
src/sonic-config-engine/tests/test_cfggen.py:843: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:856: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:869: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:885: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:896: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:904: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:911: output = self.run_script(argument)
src/sonic-config-engine/tests/test_cfggen.py:919: output = self.run_script(argument)

We can see only this test case checked warning. What's the different between this case and others?

utils.to_dict(
Expand Down