Skip to content

Commit

Permalink
Force package search during unit test ref resolution to only look at …
Browse files Browse the repository at this point in the history
…package of unit test

This is necessary because when we create the shadow manifest for the running
the unit test node, the included models whether direct or external, get rewritten
as being in the unit test's package.
  • Loading branch information
QMalcolm committed Jan 16, 2024
1 parent 4aa739d commit 55b2606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/dbt/context/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def resolve(
target_version: Optional[NodeVersion] = None,
) -> RelationProxy:
target_name = f"{self.model.name}__{target_name}"
return super().resolve(target_name, target_package, target_version)
return super().resolve(target_name, self.model.package_name, target_version)


# `source` implementations
Expand Down

0 comments on commit 55b2606

Please sign in to comment.