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: add test for SPA explore endpoints around missing datasets #21303

Merged
merged 4 commits into from
Sep 9, 2022

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Sep 1, 2022

SUMMARY

Added test to validate the proper response that we currently returning for missing/not found datasets

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #21303 (813d9d0) into master (8c2719b) will decrease coverage by 0.17%.
The diff coverage is n/a.

❗ Current head 813d9d0 differs from pull request most recent head 935fe24. Consider uploading reports for the commit 935fe24 to get more accurate results

@@            Coverage Diff             @@
##           master   #21303      +/-   ##
==========================================
- Coverage   66.61%   66.44%   -0.18%     
==========================================
  Files        1791     1791              
  Lines       68539    68539              
  Branches     7310     7310              
==========================================
- Hits        45656    45539     -117     
- Misses      21002    21119     +117     
  Partials     1881     1881              
Flag Coverage Δ
hive ?
mysql 80.84% <ø> (+<0.01%) ⬆️
postgres 80.89% <ø> (+<0.01%) ⬆️
presto ?
python 81.00% <ø> (-0.36%) ⬇️
sqlite 79.44% <ø> (+<0.01%) ⬆️
unit ?

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

Impacted Files Coverage Δ
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
superset/db_engine_specs/hive.py 71.09% <0.00%> (-16.02%) ⬇️
superset/db_engine_specs/presto.py 81.32% <0.00%> (-6.63%) ⬇️
superset/models/sql_lab.py 74.90% <0.00%> (-2.00%) ⬇️
superset/initialization/__init__.py 90.03% <0.00%> (-1.72%) ⬇️
superset/connectors/sqla/models.py 89.90% <0.00%> (-0.70%) ⬇️
superset/db_engine_specs/base.py 88.01% <0.00%> (-0.32%) ⬇️
superset/models/core.py 88.81% <0.00%> (-0.24%) ⬇️
superset/utils/core.py 89.88% <0.00%> (-0.12%) ⬇️
superset/explore/commands/get.py 91.95% <0.00%> (+2.29%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pull-request-size pull-request-size bot added size/M and removed size/S labels Sep 1, 2022
"/api/v1/explore/?dataset_id=50000&dataset_type=table",
)
response.json["result"]["dataset"]["name"] == "[Missing Dataset]"
assert response.status_code == 200

Choose a reason for hiding this comment

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

Does this mean we are expecting a 200 when no dataset was found?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah same question.

Copy link
Member Author

Choose a reason for hiding this comment

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

yea this is the expected results whenever we hit explore with a unknown dataset, assuming product is okay with this for now but if this needs to change atleast we have a test to warrant expected result

@hughhhh hughhhh merged commit 14cd8a2 into master Sep 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the ds-404-test branch March 26, 2024 16:10
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/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants