Skip to content

Commit

Permalink
Replace removed .rhbk by type check
Browse files Browse the repository at this point in the history
  • Loading branch information
lhellebr committed Feb 5, 2025
1 parent 26142e9 commit 7c4c757
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pytest_fixtures/component/satellite_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def rhsso_setting_setup(request, module_target_sat):
'oidc_algorithm': 'RS256',
'oidc_audience': [f'{module_target_sat.hostname}-foreman-openidc'],
'oidc_issuer': f'{uri}/auth/realms/{realm}',
'oidc_jwks_url': f'{uri}/auth/realms' f'/{realm}/protocol/openid-connect/certs',
'oidc_jwks_url': f'{uri}/auth/realms/{realm}/protocol/openid-connect/certs',
}
for setting_name, setting_value in rhhso_settings.items():
# replace entietes field with targetsat.api
Expand Down
4 changes: 2 additions & 2 deletions robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,7 @@ def update_sso_user(self, username, group_name=None):
def delete_sso_user(self, username):
"""Delete the RHSSO user"""
user_details = self.get_sso_user_details(username)
self.execute(f"{self.kcadm} delete -r {settings.sso.realm} users/{user_details['id']}")
self.execute(f"{self.kcadm} delete -r {self.realm} users/{user_details['id']}")

def create_group(self, group_name=None):
"""Create the RHSSO group"""
Expand Down Expand Up @@ -2560,7 +2560,7 @@ def get_oidc_client_id(self):
@cached_property
def oidc_authorization_endpoint(self):
"""getter for the oidc authorization endpoint"""
return f"https://{self.host_name}/auth/realms/" f"{self.realm}/protocol/openid-connect/auth"
return f"https://{self.host_name}/auth/realms/{self.realm}/protocol/openid-connect/auth"

def get_two_factor_token_rh_sso_url(self):
"""getter for the two factor token rh_sso url"""
Expand Down
3 changes: 2 additions & 1 deletion tests/foreman/destructive/test_ldapauthsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from robottelo.config import settings
from robottelo.constants import HAMMER_CONFIG
from robottelo.exceptions import CLIReturnCodeError
from robottelo.hosts import RHBKHost

pytestmark = [pytest.mark.destructive]

Expand Down Expand Up @@ -64,7 +65,7 @@ def test_rhsso_login_using_hammer(
:CaseImportance: High
"""
if default_sso_host.rhbk:
if type(default_sso_host) is RHBKHost:
user = settings.rhbk.rhbk_user
password = settings.rhbk.rhbk_password
else:
Expand Down

0 comments on commit 7c4c757

Please sign in to comment.