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

feat: add missing tests for webhooks feature #5537

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

jfcalvo
Copy link
Member

@jfcalvo jfcalvo commented Sep 25, 2024

Description

This PR adds some missing tests checking that webhook events are enqueued on background jobs when actions occurs inside Argilla app.

Refs #1836

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (change restructuring the codebase without changing functionality)
  • Improvement (change adding some improvement to an existing functionality)
  • Documentation update

How Has This Been Tested

  • All tests should be passing.

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@jfcalvo jfcalvo requested a review from frascuchon September 25, 2024 12:36
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.72%. Comparing base (d2cfbed) to head (73bafa1).
Report is 9 commits behind head on feat/add-webhooks-feature-branch.

Additional details and impacted files
@@                         Coverage Diff                          @@
##           feat/add-webhooks-feature-branch    #5537      +/-   ##
====================================================================
+ Coverage                             91.55%   91.72%   +0.16%     
====================================================================
  Files                                   159      159              
  Lines                                  6374     6382       +8     
====================================================================
+ Hits                                   5836     5854      +18     
+ Misses                                  538      528      -10     
Flag Coverage Δ
argilla-server 91.72% <100.00%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


assert response.status_code == 200

event = await build_dataset_event(db, DatasetEvent.updated, dataset)
Copy link
Member

Choose a reason for hiding this comment

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

This is working because the db session is shared by all the test components, right? Otherwise we should refresh the dataset instance before building the event?

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly.

@jfcalvo jfcalvo merged commit d8d2986 into feat/add-webhooks-feature-branch Sep 25, 2024
6 checks passed
@jfcalvo jfcalvo deleted the feat/add-webhooks-tests branch September 25, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants