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

Update API endpoint for host facts #15546

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

shweta83
Copy link
Contributor

@shweta83 shweta83 commented Jul 2, 2024

Problem Statement

API endpoint for facts values : /api/hosts/:host_id/facts was incorrectly placed causing test failure.

Solution

Updated.

Related Issues

@shweta83 shweta83 added TestFailure Issues and PRs related to a test failing in automation Easy Fix :) Easiest Fix to review and quick merge request. CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Jul 2, 2024
@shweta83 shweta83 self-assigned this Jul 2, 2024
@shweta83 shweta83 requested a review from a team as a code owner July 2, 2024 08:48
@shweta83
Copy link
Contributor Author

shweta83 commented Jul 2, 2024

trigger: test-robottelo
pytest: tests/foreman/endtoend/test_api_endtoend.py::TestAvailableURLs::test_positive_get_links

@shweta83 shweta83 requested a review from pondrejk July 2, 2024 08:48
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7597
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/endtoend/test_api_endtoend.py::TestAvailableURLs::test_positive_get_links --external-logging
Test Result : ================== 1 failed, 9 warnings in 681.28s (0:11:21) ===================

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Jul 2, 2024
@pondrejk
Copy link
Contributor

pondrejk commented Jul 3, 2024

trigger: test-robottelo
pytest: tests/foreman/endtoend/test_api_endtoend.py::TestAvailableURLs::test_positive_get_links
env:
    ROBOTTELO_server__deploy_arguments__deploy_sat_version: '6.15'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7617
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/endtoend/test_api_endtoend.py::TestAvailableURLs::test_positive_get_links --external-logging
Test Result : ======================== 6 warnings, 1 error in 55.94s =========================

@shweta83
Copy link
Contributor Author

shweta83 commented Jul 5, 2024

The reason of failure is the API endpoint is missing from /api/v2. After discussion with developer, the json created in /api/v2 gets automatically generated by rails and it usually fetches few API endpoints. This is not a very reliable source of truth to check all endpoints and he has suggested to test apidoc/v2 instead.
Any thoughts here @jyejare @JacobCallahan ?

@pondrejk
Copy link
Contributor

pondrejk commented Jul 9, 2024

Hi, aside from what was said above (I'm definitely for finding a better way to do this -- possibly by using https://github.com/JacobCallahan/apix), the humble aim of test_positive_get_links is to let us know about api changes on the product side (only first level depth, but still something). The current failing state on 6.15 was introduced by https://github.com/SatelliteQE/robottelo/pull/15265/files#diff-99f40169f11495c51e665ec0a4299a4f4206cd4c72664afd264e227987ea95c8R358 not by the product change. So I'd vote for restoring the match between API_PATHS and api/v2 so that the test can perform its original purpose.

@shweta83
Copy link
Contributor Author

shweta83 commented Jul 9, 2024

Hi, aside from what was said above (I'm definitely for finding a better way to do this -- possibly by using https://github.com/JacobCallahan/apix), the humble aim of test_positive_get_links is to let us know about api changes on the product side (only first level depth, but still something). The current failing state on 6.15 was introduced by https://github.com/SatelliteQE/robottelo/pull/15265/files#diff-99f40169f11495c51e665ec0a4299a4f4206cd4c72664afd264e227987ea95c8R358 not by the product change. So I'd vote for restoring the match between API_PATHS and api/v2 so that the test can perform its original purpose.

Sure thing. I can remove the endpoint for now so that the sanity passes and we can come up with another solution.

@shweta83 shweta83 force-pushed the update_facts_api_endpoint branch from d168a07 to c98575a Compare July 9, 2024 11:56
@shweta83 shweta83 requested a review from a team as a code owner July 9, 2024 11:56
@pondrejk pondrejk merged commit 64bccfe into SatelliteQE:master Jul 9, 2024
8 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 9, 2024
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches Easy Fix :) Easiest Fix to review and quick merge request. PRT-Failed Indicates that latest PRT run is failed for the PR TestFailure Issues and PRs related to a test failing in automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants