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

Bz1699188 #11688

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Bz1699188 #11688

merged 1 commit into from
Sep 5, 2023

Conversation

lhellebr
Copy link
Contributor

Close-loop BZ 1699188. Create user, assign him a role with permission filter, gather facts on a host, get facts from this host through API as that user.
Depends on: SatelliteQE/nailgun#936

@lhellebr lhellebr added CherryPick PR needs CherryPick to previous branches 6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 labels Jun 15, 2023
@lhellebr lhellebr force-pushed the bz1699188 branch 2 times, most recently from 90eca94 to 112c43c Compare June 15, 2023 15:57
@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

Copy link
Contributor

@synkd synkd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. ACK pending addressing @shweta83's suggestions.

tests/foreman/api/test_ansible.py Outdated Show resolved Hide resolved
@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr
Copy link
Contributor Author

lhellebr commented Jun 19, 2023

$ pytest tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
===================================================== test session starts ======================================================
platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0 -- /home/lhellebr/git/robottelo/venv/bin/python
Mandatory Requirements Available: pytest-reportportal==5.1.9 broker[docker]==0.3.2 pytest-xdist==3.3.1 requests==2.31.0 wrapanapi==3.5.15 cryptography==41.0.1 pytest==7.3.2
Optional Requirements Available: sphinx-autoapi==2.1.1 sphinx==7.0.1 redis==4.5.5 pre-commit==3.3.2
cachedir: .pytest_cache
shared_function enabled - OFF - scope:  - storage: file
rootdir: /home/lhellebr/git/robottelo
configfile: pytest.ini
plugins: cov-3.0.0, services-2.2.1, xdist-3.2.1, reportportal-5.1.7, mock-3.10.0, ibutsu-2.2.4
collected 3 items                                                                                                              

tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter[rhel6] PASSED                                    [ 33%]
tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter[rhel7] PASSED                                    [ 66%]
tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter[rhel8] PASSED                                    [100%]

======================================================= warnings summary =======================================================
tests/foreman/api/test_ansible.py: 201 warnings
  /home/lhellebr/git/robottelo/venv/lib/python3.9/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '<AT-FQDN>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
    warnings.warn(

tests/foreman/api/test_ansible.py: 56 warnings
  /home/lhellebr/git/robottelo/venv/lib/python3.9/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '<FQDN>'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================= 3 passed, 257 warnings in 1615.55s (0:26:55) =========================================

@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr lhellebr requested a review from shweta83 June 20, 2023 13:15
@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

2 similar comments
@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr
Copy link
Contributor Author

lhellebr commented Jun 21, 2023

I suspect there is a race condition causing ISE when attempting to delete a host while its facts haven't yet been imported. It happens only for RHEL8, perhaps because it has more facts. It doesn't happen locally but it does in PRT. I'll switch this to Draft so I can use PRT to come up with a workaround.

@lhellebr lhellebr marked this pull request as draft June 21, 2023 13:18
@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr
Copy link
Contributor Author

PRT failures caused by AT migration, waiting for it to work.

@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

2 similar comments
@ogajduse
Copy link
Member

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

tests/foreman/api/test_ansible.py Show resolved Hide resolved
tests/foreman/api/test_ansible.py Show resolved Hide resolved
tests/foreman/api/test_ansible.py Outdated Show resolved Hide resolved
tests/foreman/api/test_ansible.py Show resolved Hide resolved
@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter
nailgun: 936

@lhellebr
Copy link
Contributor Author

Can we celebrate this PR's one month anniversary by merging it?

@omkarkhatavkar
Copy link
Contributor

@rplevka can you please confirm the questions you have addressed?

@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter

@lhellebr
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter

@omkarkhatavkar
Copy link
Contributor

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter

@Gauravtalreja1
Copy link
Collaborator

@lhellebr Can you look into failing PRT results?

@lhellebr
Copy link
Contributor Author

lhellebr commented Sep 5, 2023

trigger: test-robottelo
pytest: tests/foreman/api/test_ansible.py::test_positive_read_facts_with_filter

Copy link
Member

@ogajduse ogajduse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRT passed, ACK

@ogajduse ogajduse merged commit 3356586 into SatelliteQE:master Sep 5, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants