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

[6.15.z] Fix expected user name #17201

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #17161

Problem Statement

Test tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role fails with the following error message:

AssertionError: assert 'givenName sn' in 'Foreman User'

The reason is that instead of comparing expected value of the name field, verbatim names of those fields are used instead - givenName and sn of course aren't names of the user but names of the fields where that info is stored.

Solution

Use user shown name config field that is meant specifically for this, it specifies the expected display name of the user in config file.
This is consistent with changes in other similar tests as per #16382

Related Issues

Similar failures fixed in #16382

(cherry picked from commit ac6afaf)
@Satellite-QE Satellite-QE requested a review from a team as a code owner December 18, 2024 14:07
@Satellite-QE Satellite-QE added 6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Dec 18, 2024
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role

@Satellite-QE Satellite-QE added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Dec 18, 2024
@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 9668
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role --external-logging
Test Result : ================== 2 passed, 45 warnings in 924.47s (0:15:24) ==================

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Dec 18, 2024
@Satellite-QE Satellite-QE merged commit 68f24ec into 6.15.z Dec 18, 2024
17 of 18 checks passed
@Satellite-QE Satellite-QE deleted the cherry-pick-6.15.z-ac6afaf71c3ee157affe270a28015e614d048675 branch December 18, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants