-
Notifications
You must be signed in to change notification settings - Fork 122
chore: webhook integration tests generation script upgrade #4215
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
base: develop
Are you sure you want to change the base?
Conversation
Summary by CodeRabbit
WalkthroughThis update enhances the repository by introducing automated generation of integration test cases for modified source files during pre-commit checks. The Changes
Sequence Diagram(s)sequenceDiagram
participant Git as Git
participant PreCommit as ".husky/pre-commit"
participant TestGen as "Test Case Generator"
participant Staging as "Git Staging"
participant User as "Developer"
Git->>PreCommit: Run "git diff --cached" to detect modified files
PreCommit->>TestGen: Loop through each modified source file
TestGen-->>PreCommit: Generate integration test case file
PreCommit->>Git: Check git status pre/post generation
PreCommit->>Staging: Stage new/modified test case files
PreCommit->>User: Display notification for verification and commit
Suggested reviewers
Suggestions for improvement:
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (9)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.husky/pre-commit (1)
1-38
: Well-structured implementation for automatic test case generation.The script effectively identifies changed source files and generates corresponding test cases, which aligns well with the PR objective of upgrading the webhook integration test generation script. This automation will help maintain test coverage as source files change.
Consider adding basic error handling for the
npm run generate:testcases
command to gracefully handle potential failures.# Generate new test cases -npm run generate:testcases -- --source "$source" +if ! npm run generate:testcases -- --source "$source"; then + echo "\033[1;31mError generating test cases for $source\033[0m" + exit 1 +fi🧰 Tools
🪛 GitHub Check: Check for formatting & lint errors
[warning] 1-1:
File ignored by default.🪛 GitHub Actions: Verify
[warning] 1-1: File ignored by default. Use a negated ignore pattern (like '--ignore-pattern '!<relative/path/to/filename>'') to override.
go/webhook/testcases/testcases.go (1)
32-39
: Good addition of Source struct for configuration.The new
Source
struct with aConfig
field enhances the test structure to support the v2 format mentioned in the PR objectives. This change allows for better separation of configuration from request data.It would be helpful to include a brief comment explaining the purpose of this struct and how it aligns with the v2 test structure.
// Input represents the test input data type Input struct { Request Request Source Source } +// Source represents the source configuration for webhook integration tests type Source struct { Config string `json:"config"` }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (239)
go/webhook/testcases/testdata/testcases/adjust/simple_track_call_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/adjust/simple_track_call_with_no_query_parameters_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/adjust/simple_track_call_with_wrong_created_at_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appcenter/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appcenter/test_1_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appcenter/test_2_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appcenter/test_3_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appcenter/test_4_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appsflyer/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appsflyer/test_1_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appsflyer/test_2_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appsflyer/test_3_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appsflyer/test_4_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appsflyer/test_5_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appsflyer/test_6_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/appsflyer/test_7_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/add_member_to_an_organization_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/empty_batch.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/missing_user_id_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/missing_user_id_for_all_the_requests_in_a_batch.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/missing_user_id_for_all_the_requests_in_a_batch_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/missing_user_id_for_all_the_requests_in_a_batch_1.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/successful_signup.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/successful_signup_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/successful_signup_1.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/update_tenant_settings.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/update_tenant_settings_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/auth0/update_tenant_settings_1.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/event_0__events_is_undefined_or_null_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/event_0__is_null_undefined_in_request_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/event_events_is_not_available_in_required_format_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/event_is_empty_array_in_request_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/event_is_null_in_request_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/event_mapping_done_in_ui.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/event_mapping_done_in_ui_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/success_scenario_when_event_0__events_is_valid_request_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/the_event_is_not_mapped_in_the_ui.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/the_event_is_not_mapped_in_the_ui_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_behaviors_app_session_start_event.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_behaviors_app_session_start_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_behaviors_custom_event_any_custom_event.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_behaviors_custom_event_any_custom_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_behaviors_purchase_event.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_behaviors_purchase_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_email_open_event.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_email_open_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_inappmessage_click_event.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_inappmessage_click_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_pushnotification_send_event.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_pushnotification_send_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_sms_delivery_event.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_sms_delivery_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_sms_delivery_send.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/braze/users_messages_sms_delivery_send_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_10_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_11_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_12_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_1_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_2_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_3_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_4_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_5_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_6_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_7_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_8_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/canny/test_9_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/close_crm/group_creation_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/close_crm/lead_deletion_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/close_crm/lead_update_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/cordial/multiple_object_input_event_with_batched_payload_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/cordial/simple_single_object_input_event_with_no_cid_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/cordial/simple_single_object_input_event_with_normal_channel_and_action_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_10_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_11_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_12_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_13_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_14_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_15_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_16_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_17_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_18_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_19_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_1_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_20_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_21_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_22_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_23__email_subscribed_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_2_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_3_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_4_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_5_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_6_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_7_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_8_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/customerio/test_9_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/facebook_lead_ads/facebook_lead_ads_with_empty_payload_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/facebook_lead_ads/facebook_lead_ads_with_facebook_lead_id_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/facebook_lead_ads/facebook_lead_ads_with_invalid_created_time_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/facebook_lead_ads/facebook_lead_ads_with_null_payload_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/facebook_lead_ads/facebook_lead_ads_with_unavailable_null_created_time_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/facebook_lead_ads/facebook_lead_ads_with_valid_created_time_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/facebook_lead_ads/facebook_lead_ads_without_user_id_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/formsort/when_we_receive_finalized_as_false_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/formsort/when_we_receive_finalized_as_true_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/custom_track_call_.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/custom_track_call__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/engagement_track_call_.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/engagement_track_call__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/feature_match_track_call_.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/feature_match_track_call__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/feedback_track_call_.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/feedback_track_call__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/identify_call.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/identify_call_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/no_match_track_call__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/segment_io_s2_s_track_call_.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/segment_io_s2_s_track_call__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/segment_match_track_call_and_no_user_id_and_yes_anonymous_id_as_event_session_id.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/segment_match_track_call_and_no_user_id_and_yes_anonymous_id_as_event_session_id_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/survey_track_call____multi_question_survey_.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/survey_track_call____multi_question_survey__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/survey_track_call____nps_.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/gainsightpx/survey_track_call____nps__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_10_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_11_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_12_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_13_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_14_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_15_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_16_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_17_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_18_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_19_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_1_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_20_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_21_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_22_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_23_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_24_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_25_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_26_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_27_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_28_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_29_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_2_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_3_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_4_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_5_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_6_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_7_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_8_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/iterable/test_9_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailjet/mail_jet_email_bounce_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailjet/mail_jet_email_bounce_event_where_input_event_is_of_type__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailjet/mail_jet_email_open_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailjet/mail_jet_email_sent_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailjet/mail_jet_multiple_payloads_in_single_request_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailjet/mail_jet_when_no_email_is_present_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_1_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_2_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_3_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_4_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_5_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_6_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_7_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/mailmodo/test_8_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/moengage/batch_of_events.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/moengage/batch_of_events_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/moengage/simple_track_call_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/monday/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/monday/test_1_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/monday/test_2_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/monday/test_3_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/monday/test_4_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/monday/test_5_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/olark/olark_webhook_response_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/ortto/simple_track_call_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/ortto/simple_track_call_with_unknown_field_id_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pagerduty/incident_escalated_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pagerduty/incident_priority_updated_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pagerduty/incident_resolved_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pagerduty/incident_responder_added_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pagerduty/incident_triggered_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pipedream/alias_type____type_and_user_id_is_given_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pipedream/group_type____type_and_user_id_is_given_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pipedream/identify_type____type_and_user_id_is_given_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pipedream/no_type_or_anonymous_id_is_given_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pipedream/no_type_or_user_id_is_given_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pipedream/page_type____type_and_user_id_is_given_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/pipedream/track_call____type_and_user_id_is_given_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/refiner/refiner_webhook_response.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/refiner/refiner_webhook_response_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/revenuecat/initial_purchase_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/revenuecat/purchase_event_with_anonymous_user_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/revenuecat/simple_track_call_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/satismeter/all_fields_check_with_event_as_completed_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/satismeter/neither_reponse_user_id_or_response_user_user_id_is_provided_in_payload_then_mapping_response_id_to_anonymous_id_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/segment/test_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/segment/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/segment/test_0_1.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/segment/test_0_2.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/segment/test_0_3.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/identify_call_for_customers_create_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/invalid_topic.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/invalid_topic_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/no_query_parameters_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/topic_not_found.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/topic_not_found_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/track_call____carts_create_.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/track_call____carts_create__0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/track_call____fullfillments_updated_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/track_call____order_partially_fulfilled_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/unsupported_checkout_event.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/unsupported_checkout_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/shopify/unsupported_event_type_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_0_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_1_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_2_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_3_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_4_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_5_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_6_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_7_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/signl4/test_8_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/slack/message_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/slack/team_joined_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/slack/webhook_url_verificatin_event_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/webhook/failed_webhook_request_with_malformed_json_body_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/webhook/successful_webhook_request_with_query_params_and_headers_0.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/webhook/successful_webhook_request_with_query_params_and_headers_1.json
is excluded by!**/*.json
go/webhook/testcases/testdata/testcases/webhook/successful_webhook_request_with_query_params_and_headers_2.json
is excluded by!**/*.json
package.json
is excluded by!**/*.json
test/integrations/sources/moengage/data.ts
is excluded by!**/test/**
test/integrations/sources/webhook/data.ts
is excluded by!**/test/**
test/scripts/generateJson.ts
is excluded by!**/test/**
📒 Files selected for processing (2)
.husky/pre-commit
(1 hunks)go/webhook/testcases/testcases.go
(3 hunks)
🧰 Additional context used
🪛 GitHub Check: Check for formatting & lint errors
.husky/pre-commit
[warning] 1-1:
File ignored by default.
🪛 GitHub Actions: Verify
.husky/pre-commit
[warning] 1-1: File ignored by default. Use a negated ignore pattern (like '--ignore-pattern '!<relative/path/to/filename>'') to override.
go/webhook/testcases/testcases.go
[error] 1-1: Parsing error: ESLint was configured to run on <tsconfigRootDir>/go/webhook/testcases/testcases.go
using parserOptions.project
: /tsconfig.json. The extension for the file (.go
) is non-standard. It should be added to your existing parserOptions.extraFileExtensions
.
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: ingestion-service-test
- GitHub Check: test_and_publish
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
🔇 Additional comments (3)
.husky/pre-commit (1)
29-37
: Excellent user feedback mechanisms.The colorful, informative messages clearly indicate what happened and what actions the developer needs to take. The structured output makes it easy to understand which sources were affected and where the generated files are located.
go/webhook/testcases/testcases.go (2)
90-105
: Improved JSON handling with compaction step.The new approach of reading the entire file first and compacting the JSON before decoding is a good practice. It handles potential whitespace issues in the JSON files, making the parsing more robust.
This change may also improve compatibility with test cases generated by different tools that might format JSON differently.
40-45
:❓ Verification inconclusive
Field type changes in Request struct may require test updates.
The changes to the
RawQuery
(from string to map) andBody
(from json.RawMessage to string) fields represent significant structural changes that align with the v2 test format.Ensure that all existing test cases have been updated to accommodate these changes, as they could be breaking changes for existing tests. The pre-commit hook additions should help with this by automatically generating updated test cases.
🏁 Script executed:
#!/bin/bash # Check if there are any remaining test cases using the old format echo "Checking for test files that might need updates:" find ./go/webhook/testcases/testdata/testcases -type f -name "*.json" -exec grep -l "query_parameters" {} \;Length of output: 295
Critical: Verify Test Updates for Request Struct Changes
The modifications to the
RawQuery
field (from a string to a map) and theBody
field (fromjson.RawMessage
to a string) are substantial and align with the v2 test format. However, the automated script did not find any JSON test files containing"query_parameters"
in the expected directory (./go/webhook/testcases/testdata/testcases
). This might be due to a change in the test file location or an update in the test data structure.
- Please verify manually that all test cases have been updated to reflect these changes.
- Confirm that any automated test-generation hooks or checks are targeting the correct directories.
Allure Test reports for this run are available at:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4215 +/- ##
========================================
Coverage 91.17% 91.17%
========================================
Files 632 632
Lines 33079 33079
Branches 7831 7828 -3
========================================
Hits 30160 30160
- Misses 2674 2704 +30
+ Partials 245 215 -30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Allure Test reports for this run are available at:
|
check lint errors |
Allure Test reports for this run are available at:
|
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.
why the additional index suffix ? I only see 0
in all the files suffixes
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.
Cases where multiple requests are in a request, we should be able to pick all of them. Earlier we assumed that there will only be one and picked that.
Allure Test reports for this run are available at:
|
|
What are the changes introduced in this PR?
What is the related Linear task?
Resolves INT-3149
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
Yes, webhook integration tests generation script changed
Any new dependencies introduced with this change?
No
Any new generic utility introduced or modified. Please explain the changes.
pre-commit hook modified
Any technical or performance related pointers to consider with the change?
No
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.