forked from SatelliteQE/robottelo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24e9d28
commit 3e741ee
Showing
3 changed files
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
import pytest | ||
|
||
from robottelo.config import settings | ||
from robottelo.rhsso_utils import run_command | ||
from robottelo.ssh import command as ssh_command | ||
|
||
|
||
@pytest.fixture | ||
def foreman_service_teardown(): | ||
"""stop and restart of foreman service""" | ||
yield | ||
run_command('foreman-maintain service start --only=foreman') | ||
|
||
|
||
@pytest.fixture(autouse=True, scope="session") | ||
def relax_bfa(): | ||
"""Relax BFA protection against failed login attempts | ||
The robottelo.ssh.command should resolve the hostname for the current xdist worker | ||
""" | ||
if settings.server.hostname: | ||
ssh_command( | ||
f'hammer -u admin -p {settings.server.admin_password} ' | ||
'settings set --name "failed_login_attempts_limit" --value 0' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters