Skip to content

Commit

Permalink
add regression test for overwriting absolute paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Myles1 committed Oct 23, 2024
1 parent dc370bf commit 9ae8aae
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/functional/adapter/simple_seed/test_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,27 @@ def test_empty_seeds(self, project):

class TestEmptySeed(BaseTestEmptySeed):
pass


class TestAbsoluteSeedPaths:
"""
This is a regression test for issue #10886.
We're ensuring that dbt will not overwrite files that are passed in as asbolute paths in dbt_project.yml
"""

@pytest.fixture(scope="class")
def project_config_update(self, project_root):
# Assign an absolute path to seed-paths
return {
"seed-paths": [str(Path(project_root) / "seeds")],
}

@pytest.fixture(scope="class")
def seeds(self):
return {"my_seed.csv": seed__with_dots_csv}

def test_absolute_seeds_paths(self, project):
results = run_dbt(["seed"])
assert len(results) == 1
# Should not fail due to file being overwritten
results = run_dbt(["seed"])

0 comments on commit 9ae8aae

Please sign in to comment.