Skip to content

Commit

Permalink
Merge pull request #7320 from freedomofpress/stg-pytest-return
Browse files Browse the repository at this point in the history
Don't return in test_swap_disabled, use skip instead
  • Loading branch information
zenmonkeykstop authored Nov 4, 2024
2 parents 6548ab2 + 18ceab3 commit ddf1480
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions molecule/testinfra/common/test_system_hardening.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ def test_swap_disabled(host):
"""
hostname = host.check_output("hostname")

# Mon doesn't have swap disabled yet
if hostname.startswith("mon"):
return True
pytest.skip("mon doesn't have swap disabled yet")

c = host.check_output("swapon --summary")
# A leading slash will indicate full path to a swapfile.
Expand Down

0 comments on commit ddf1480

Please sign in to comment.