-
Notifications
You must be signed in to change notification settings - Fork 115
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
improved webhook event trigger test #13048
improved webhook event trigger test #13048
Conversation
trigger: test-robottelo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't completely understand what the setting change does, but it looks good to me. When I originally wrote this test I just was making sure the webhook event was triggering something in the log.
Also is there a reason this is marked for T2 review also? |
8530ff4
to
7d3c631
Compare
@Griffin-Sullivan safemode kind of protects users from doing something destructive with their ERB templates, https://access.redhat.com/documentation/en-us/red_hat_satellite/6.14/html/administering_red_hat_satellite/administration_settings_admin (section A11), it's on by default. T2 was there before, I just kept it |
trigger: test-robottelo |
ugh, after move from entities.Webhook to target_sat.api.Webhook this now fails with |
trigger: test-robottelo |
trigger: test-robottelo |
Co-authored-by: Omkar Khatavkar <okhatavk@redhat.com>
trigger: test-robottelo |
trigger: test-robottelo |
1 similar comment
trigger: test-robottelo |
The prt fails with the TypeError as before, seems like it doesn't take into account the nailgun fix by @omkarkhatavkar ? |
trigger: test-robottelo |
https://github.com/SatelliteQE/robottelo/actions/workflows/update_robottelo_image.yml is failing. |
yay! thanks for the quick turnaround @omkarkhatavkar |
* improved webhook event trigger test * Update tests/foreman/api/test_webhook.py Co-authored-by: Omkar Khatavkar <okhatavk@redhat.com> --------- Co-authored-by: Omkar Khatavkar <okhatavk@redhat.com>
Problem Statement
Webhook trigger is blocked by the safemode setting enabled, which is expected as the safemode prevents template rendering which is prerequisite for webhook trigger.
The existing test didn't see this as it was looking just for one specific line in logs, so it passed even though no action was triggered.
Solution
This PR disables the safemode setting for the test so that the task is actually triggers. Also it adds a check for the successful completion of the triggered task.