From 6f0531e6881636880b8f17b10b755145ec8452e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:53:56 -0500 Subject: [PATCH] rework test to ignore utils version (#10625) (#10626) (cherry picked from commit 98fddcf54ff985fc97e0aafccb357f3d93d3fdbd) Co-authored-by: Emily Rockman --- .../dependencies/test_dependency_options.py | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/tests/functional/dependencies/test_dependency_options.py b/tests/functional/dependencies/test_dependency_options.py index 9d28743c32f..ccd18a51b6c 100644 --- a/tests/functional/dependencies/test_dependency_options.py +++ b/tests/functional/dependencies/test_dependency_options.py @@ -32,16 +32,14 @@ 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"]) @@ -49,16 +47,13 @@ def test_deps_default(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_add(self, clean_start): run_dbt(["deps", "--add-package", "dbt-labs/audit_helper@0.9.0"])