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] negative test for webhook task #13049

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

pondrejk
Copy link
Contributor

@pondrejk pondrejk commented Nov 7, 2023

Problem Statement

The "Deliver webhook..." task for the triggered hook previously succeeded even If the webhook execution failed for some reason. This will change in 6.15

Solution

I'm adding a negative test to cover this scenario. Note that the upstream PR isn't merged yet, so prt trigger would fail atm

Related Issues

SAT-21112

@pondrejk pondrejk added the No-CherryPick PR doesnt need CherryPick to previous branches label Nov 7, 2023
@pondrejk pondrejk requested review from a team November 7, 2023 10:13
@pondrejk pondrejk self-assigned this Nov 7, 2023
@pondrejk
Copy link
Contributor Author

pondrejk commented Nov 8, 2023

@jameerpathan111 changes committed, thanks!

Copy link
Contributor

@Griffin-Sullivan Griffin-Sullivan left a comment

Choose a reason for hiding this comment

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

Where are we asserting that the task failed? Also are you able to get local results with a packit installed stream Satellite?

@pondrejk
Copy link
Contributor Author

pondrejk commented Nov 9, 2023

pytest tests/foreman/api/test_webhook.py -k negative_event_task_failed
========================================== test session starts ===========================================
                                                      

tests/foreman/api/test_webhook.py .                                                                [100%]

@pondrejk
Copy link
Contributor Author

pondrejk commented Nov 9, 2023

@Griffin-Sullivan yeah it's kind of buried, the must_succeed=False parameter tells wait_for_task to assert failure

:param must_succeed: Assert success result on finished task.

@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_webhook.py -k test_negative_event_task_failed

@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_webhook.py -k test_negative_event_task_failed

1 similar comment
@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_webhook.py -k test_negative_event_task_failed

@pondrejk
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_webhook.py -k test_negative_event_task_failed

@pondrejk
Copy link
Contributor Author

@Griffin-Sullivan @jameerpathan111 the thing landed in stream, prt now passes

@pondrejk pondrejk added CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.15.z Introduced in or relating directly to Satellite 6.15 and removed No-CherryPick PR doesnt need CherryPick to previous branches labels Nov 23, 2023
@jameerpathan111 jameerpathan111 merged commit 37da211 into SatelliteQE:master Nov 23, 2023
github-actions bot pushed a commit that referenced this pull request Nov 23, 2023
negative test for webhook task

(cherry picked from commit 37da211)
pondrejk added a commit that referenced this pull request Nov 24, 2023
negative test for webhook task

(cherry picked from commit 37da211)
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
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 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants