Skip to content

Commit

Permalink
add --vars handling in TestModifiedVars
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Jul 29, 2024
1 parent 8ff33f9 commit bae7728
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/functional/defer_state/test_modified_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,3 +1174,14 @@ def test_changed_vars(self, project):
assert run_dbt(["list", "-s", "state:modified.vars", "--state", "./state"]) == [
"test.view_model"
]

# Reset dbt_project.yml
update_config_file({"vars": {"my_var": 1}}, "dbt_project.yml")

# Modify var via --var CLI flag
assert not run_dbt(
["list", "--vars", '{"my_var": 1}', "-s", "state:modified", "--state", "./state"]
)
assert run_dbt(
["list", "--vars", '{"my_var": 2}', "-s", "state:modified", "--state", "./state"]
) == ["test.view_model"]

0 comments on commit bae7728

Please sign in to comment.