-
Notifications
You must be signed in to change notification settings - Fork 740
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
Password hardening test fix #6453
Password hardening test fix #6453
Conversation
… loop when calling fixtures Change-Id: I43cf89ad498405521723e7fb164ef46929095b6b
…ng explicity the feature disable Change-Id: Iea5b589290a7900b0585286ff3ef336f612e1b27
This pull request introduces 1 alert and fixes 3 when merging 3899b9a into a8170d7 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request fixes 3 alerts when merging 5533309 into 66aaf8d - view on LGTM.com fixed alerts:
|
@davidpil2002 could you please add a new fixture to address teardown issue? |
@ZhaohuiS This fixture already exist |
@davidpil2002 I am not sure if it's enough, because last time, when I tried to run this script, it raised command error, it configured some commands on the testbed, it reminded me to change the original password, because it's too simple, otherwise, I can't login the testbed. Could you make the clean_passw_policies more robust to handle any exception in case of blocking the access to testbed? Much appreciated! |
this is meaning that the expiration of the user admin remained 0 and the feature remained enabled as well. In addition, we can in parallel debug the connection testbed issue. This not happened to me, can you share a full log, to see if the clean_passw_policies was called? `def set_default_passw_hardening_policies(duthosts, enum_rand_one_per_hwsku_hostname):
|
@davidpil2002 Sure, I will verify it then give you feedback in this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify on physical testbed, all testcases run to success.
What is the motivation for this PR? Fix the issue #6428 How did you do it? explained in the summary. How did you verify/test it? Run the test with the sonic-builimage build from branch 202205 command line: py.test /sonic-mgmt/tests/passw_hardening/test_passw_hardening.py
What is the motivation for this PR? Fix the issue sonic-net#6428 How did you do it? explained in the summary. How did you verify/test it? Run the test with the sonic-builimage build from branch 202205 command line: py.test /sonic-mgmt/tests/passw_hardening/test_passw_hardening.py
|
||
common_password_diff = [li for li in difflib.ndiff(command_password_stdout, common_password_expected) if | ||
li[0] != ' '] | ||
pytest_assert(len(common_password_diff) == 0, common_password_diff) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description of PR
Summary:
In continue of password-hardening sonic-mgmt tests. Link: #5503
found 2 test issues:
Fixes # (issue)
Issue link:
#6428
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix the issue #6428
How did you do it?
explained in the summary.
How did you verify/test it?
Run the test with the sonic-builimage build from branch 202205
command line:
py.test /sonic-mgmt/tests/passw_hardening/test_passw_hardening.py
Any platform specific information?
no
Supported testbed topology if it's a new test case?
no
Documentation