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

test(jinja): refactor to functional tests #19606

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

villebro
Copy link
Member

@villebro villebro commented Apr 8, 2022

SUMMARY

Refactor the Jinja tests from class based tests to pytest functional tests. Also break out unit tests that don't require the metastore into a separate file:

  • tests/integration_tests/jinja_context_tests.py renamed to tests/integration_tests/test_jinja_context.py (tests that require the metastore)
  • new file: tests/integration_tests/test_jinja_context.py (tests that don't require a metastore db)

Other than the refactor, the tests are functionally equal to the old tests.

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 Apr 8, 2022

Codecov Report

Merging #19606 (22c164a) into master (1ad82af) will decrease coverage by 12.65%.
The diff coverage is n/a.

❗ Current head 22c164a differs from pull request most recent head d37d452. Consider uploading reports for the commit d37d452 to get more accurate results

@@             Coverage Diff             @@
##           master   #19606       +/-   ##
===========================================
- Coverage   66.53%   53.87%   -12.66%     
===========================================
  Files        1681     1681               
  Lines       64319    64319               
  Branches     6564     6564               
===========================================
- Hits        42793    34655     -8138     
- Misses      19853    27991     +8138     
  Partials     1673     1673               
Flag Coverage Δ
hive 52.66% <ø> (ø)
mysql ?
postgres ?
presto 52.51% <ø> (ø)
python 56.63% <ø> (-25.75%) ⬇️
sqlite ?
unit 47.71% <ø> (+0.46%) ⬆️

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

Impacted Files Coverage Δ
superset/utils/dashboard_import_export.py 0.00% <0.00%> (-100.00%) ⬇️
superset/key_value/commands/upsert.py 0.00% <0.00%> (-89.59%) ⬇️
superset/key_value/commands/update.py 0.00% <0.00%> (-89.37%) ⬇️
superset/key_value/commands/delete.py 0.00% <0.00%> (-85.30%) ⬇️
superset/key_value/commands/delete_expired.py 0.00% <0.00%> (-80.77%) ⬇️
superset/dashboards/commands/importers/v0.py 14.79% <0.00%> (-75.15%) ⬇️
superset/datasets/commands/importers/v0.py 24.82% <0.00%> (-68.80%) ⬇️
superset/databases/commands/test_connection.py 31.42% <0.00%> (-68.58%) ⬇️
superset/datasets/commands/update.py 25.88% <0.00%> (-68.24%) ⬇️
superset/datasets/commands/create.py 30.18% <0.00%> (-67.93%) ⬇️
... and 263 more

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 1ad82af...d37d452. Read the comment docs.

@villebro villebro merged commit 9a9e3b6 into apache:master Apr 8, 2022
@villebro villebro deleted the villebro/template-test branch April 8, 2022 17:32
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.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 preset-io size/XL 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants