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

[CT-2913] Run unit tests in packages that are not the root package #8285

Closed
Tracked by #8283
gshank opened this issue Aug 2, 2023 · 2 comments · Fixed by #9184
Closed
Tracked by #8283

[CT-2913] Run unit tests in packages that are not the root package #8285

gshank opened this issue Aug 2, 2023 · 2 comments · Fixed by #9184
Assignees

Comments

@gshank
Copy link
Contributor

gshank commented Aug 2, 2023

Description

If we want to handle running unit tests in packages that are not the root package, we need to make a few changes in the unit testing code.

  • Construct a unique_id that uses the non-root package name
  • Set the package name in the constructed UnitTestNode

Acceptance Criteria

Non-root package unit tests are executed if selected.

Impact to Other Teams

None

Will backports be required?

No

Context

@github-actions github-actions bot changed the title Update core/dbt/parser/unit_tests.py to handle various TODOs and deferred bits [CT-2913] Update core/dbt/parser/unit_tests.py to handle various TODOs and deferred bits Aug 2, 2023
@graciegoheen graciegoheen changed the title [CT-2913] Update core/dbt/parser/unit_tests.py to handle various TODOs and deferred bits [CT-2913] Run unit tests in packages that are not the root package Nov 15, 2023
@graciegoheen
Copy link
Contributor

graciegoheen commented Nov 20, 2023

Notes from estimation:

  • right now we're assuming it's just in the root package in the parsing code
  • make sure the package of the unit test is included in the unit test node
  • do we actually want these disabled by default? you can't change the logic in a package... or provide a simple way to not select them? even if we don't do this, it should be an intentional choice
  • we will want to put tests on this

@MichelleArk
Copy link
Contributor

Resolved by: #9184

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 a pull request may close this issue.

4 participants