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

Move skip check of test_passwd_hardening to tests_mark_conditions.yaml #6429

Merged
merged 1 commit into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions tests/common/plugins/conditional_mark/tests_mark_conditions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,16 @@ ntp/test_ntp.py::test_ntp_long_jump_disabled:
strict: True
reason: "Known NTP bug"

#######################################
##### passw_hardening #####
#######################################
passw_hardening/test_passw_hardening.py:
skip:
reason: "Password-hardening supported just in master version"
conditions:
- "release not in ['master']"
- https://github.com/sonic-net/sonic-mgmt/issues/6428

#######################################
##### pc #####
#######################################
Expand Down
6 changes: 0 additions & 6 deletions tests/passw_hardening/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ def set_default_passw_hardening_policies(duthosts, enum_rand_one_per_hwsku_hostn

test_passw_hardening.config_and_review_policies(duthost, passw_hardening_ob_dis, test_passw_hardening.PAM_PASSWORD_CONF_DEFAULT_EXPECTED)

@pytest.fixture(scope="module", autouse=True)
def passw_version_required(duthosts, enum_rand_one_per_hwsku_hostname):
duthost = duthosts[enum_rand_one_per_hwsku_hostname]
if not "master" in duthost.os_version:
pytest.skip("Password-hardening supported just in master version")

@pytest.fixture(scope="function")
def clean_passw_policies(duthosts, enum_rand_one_per_hwsku_hostname):
yield
Expand Down