-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* wip * add tests * changelog * nits * pr feedback * nits (cherry picked from commit 01d481b) Co-authored-by: Chenyu Li <[email protected]>
- Loading branch information
1 parent
bebd6ca
commit 7d60d63
Showing
8 changed files
with
83 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Fixes | ||
body: Fix git repository with subdirectory for Deps | ||
time: 2023-11-07T09:23:58.214271-08:00 | ||
custom: | ||
Author: ChenyuLInx | ||
Issue: "9000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,6 +216,43 @@ def test_simple_dependency_deps(self, project): | |
run_dbt(["deps"]) | ||
|
||
|
||
class TestSimpleDependencyWithSubdirs(object): | ||
# dbt should convert these into a single dependency internally | ||
@pytest.fixture(scope="class") | ||
def packages(self): | ||
return { | ||
"packages": [ | ||
{ | ||
"git": "https://github.com/dbt-labs/dbt-multipe-packages.git", | ||
"subdirectory": "dbt-utils-main", | ||
"revision": "v0.1.0", | ||
}, | ||
{ | ||
"git": "https://github.com/dbt-labs/dbt-multipe-packages.git", | ||
"subdirectory": "dbt-date-main", | ||
"revision": "v0.1.0", | ||
}, | ||
] | ||
} | ||
|
||
def test_git_with_multiple_subdir(self, project): | ||
run_dbt(["deps"]) | ||
assert os.path.exists("package-lock.yml") | ||
expected = """packages: | ||
- git: https://github.com/dbt-labs/dbt-multipe-packages.git | ||
revision: v0.1.0 | ||
subdirectory: dbt-utils-main | ||
- git: https://github.com/dbt-labs/dbt-multipe-packages.git | ||
revision: v0.1.0 | ||
subdirectory: dbt-date-main | ||
sha1_hash: 0b643b06246ca34be82ef09524a30635d37aa3be | ||
""" | ||
with open("package-lock.yml") as fp: | ||
contents = fp.read() | ||
assert contents == expected | ||
assert len(os.listdir("dbt_packages")) == 2 | ||
|
||
|
||
class TestRekeyedDependencyWithSubduplicates(object): | ||
# this revision of dbt-integration-project requires [email protected], which the | ||
# package config handling should detect | ||
|