-
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.
[Backport 1.7.latest] Fix test after dbt-utils release (#10627)
* rework test to ignore utils version (#10625) # Conflicts: # tests/functional/dependencies/test_dependency_options.py * fix spacing for 1.7
- Loading branch information
Showing
1 changed file
with
15 additions
and
20 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 |
---|---|---|
|
@@ -32,33 +32,28 @@ def test_deps_lock(self, clean_start): | |
assert os.path.exists("package-lock.yml") | ||
with open("package-lock.yml") as fp: | ||
contents = fp.read() | ||
assert ( | ||
contents | ||
== """packages: | ||
- package: fivetran/fivetran_utils | ||
version: 0.4.7 | ||
- package: dbt-labs/dbt_utils | ||
version: 1.2.0 | ||
sha1_hash: 71304bca2138cf8004070b3573a1e17183c0c1a8 | ||
""" | ||
) | ||
|
||
fivetran_package = "- package: fivetran/fivetran_utils\n version: 0.4.7" | ||
# dbt-utils is a dep in fivetran so we can't check for a specific version or this test fails everytime a new dbt-utils version comes out | ||
dbt_labs_package = "- package: dbt-labs/dbt_utils" | ||
package_sha = "sha1_hash: 71304bca2138cf8004070b3573a1e17183c0c1a8" | ||
assert fivetran_package in contents | ||
assert dbt_labs_package in contents | ||
assert package_sha in contents | ||
|
||
def test_deps_default(self, clean_start): | ||
run_dbt(["deps"]) | ||
assert len(os.listdir("dbt_packages")) == 2 | ||
assert os.path.exists("package-lock.yml") | ||
with open("package-lock.yml") as fp: | ||
contents = fp.read() | ||
assert ( | ||
contents | ||
== """packages: | ||
- package: fivetran/fivetran_utils | ||
version: 0.4.7 | ||
- package: dbt-labs/dbt_utils | ||
version: 1.2.0 | ||
sha1_hash: 71304bca2138cf8004070b3573a1e17183c0c1a8 | ||
""" | ||
) | ||
fivetran_package = "- package: fivetran/fivetran_utils\n version: 0.4.7" | ||
# dbt-utils is a dep in fivetran so we can't check for a specific version or this test fails everytime a new dbt-utils version comes out | ||
dbt_labs_package = "- package: dbt-labs/dbt_utils" | ||
package_sha = "sha1_hash: 71304bca2138cf8004070b3573a1e17183c0c1a8" | ||
assert fivetran_package in contents | ||
assert dbt_labs_package in contents | ||
assert package_sha in contents | ||
|
||
def test_deps_add(self, clean_start): | ||
run_dbt(["deps", "--add-package", "dbt-labs/[email protected]"]) | ||
|