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

chore: Test cases for annotations and annotation layers incorrect creation through API #17246

Merged
merged 3 commits into from
Nov 3, 2021
Merged

chore: Test cases for annotations and annotation layers incorrect creation through API #17246

merged 3 commits into from
Nov 3, 2021

Conversation

geido
Copy link
Member

@geido geido commented Oct 27, 2021

SUMMARY

This is a follow-up PR based on this request #17234 (review).

It moves the integration tests that work best as unit tests and adds test cases to cover the creation of incorrect annotations and annotation layers through the API

Thanks @villebro for guiding me through this!

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@geido geido requested review from villebro and dpgaspar and removed request for villebro October 27, 2021 13:39
@pull-request-size pull-request-size bot added size/L and removed size/M labels Oct 27, 2021
@codecov
Copy link

codecov bot commented Oct 27, 2021

Codecov Report

Merging #17246 (d7f9d3f) into master (4316fe6) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17246      +/-   ##
==========================================
+ Coverage   76.96%   76.98%   +0.01%     
==========================================
  Files        1037     1037              
  Lines       55608    55617       +9     
  Branches     7588     7588              
==========================================
+ Hits        42800    42818      +18     
+ Misses      12558    12549       -9     
  Partials      250      250              
Flag Coverage Δ
hive 81.57% <ø> (+0.04%) ⬆️
mysql 81.99% <ø> (+0.04%) ⬆️
postgres 82.00% <ø> (+0.04%) ⬆️
presto 81.86% <ø> (+0.03%) ⬆️
python 82.50% <ø> (+0.03%) ⬆️
sqlite 81.68% <ø> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
superset/db_engine_specs/presto.py 89.95% <0.00%> (-0.42%) ⬇️
superset/connectors/sqla/models.py 87.39% <0.00%> (-0.08%) ⬇️
superset/annotation_layers/api.py 84.87% <0.00%> (+1.68%) ⬆️
superset/cli.py 54.92% <0.00%> (+2.07%) ⬆️
superset/annotation_layers/annotations/api.py 87.96% <0.00%> (+3.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4316fe6...d7f9d3f. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM, but will let @dpgaspar give the final verdict as he originally requested the changes

Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

For completeness add 1 more test for update, making sure we can update a single field, since no field is required on PUTs

@geido
Copy link
Member Author

geido commented Oct 29, 2021

@dpgaspar thanks for your feedback. @villebro helped me go through your requests and we think we handled them all now. Please let me know if there is any other improvement that you see. Thank you!

@geido geido requested a review from dpgaspar October 29, 2021 15:14
@dpgaspar dpgaspar merged commit 2199ef2 into apache:master Nov 3, 2021
AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
…ation through API (#17246)

* Add/Refactor tests

* Add return type

* Update api tests
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants