Skip to content
Prev Previous commit
Switch to a state:modified command which return 0 results
  • Loading branch information
gshank committed Feb 14, 2023
commit 24ab3d0e5b214f2757efe786dbe01d64edd365b9
8 changes: 3 additions & 5 deletions tests/functional/artifacts/test_previous_version_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,18 +293,16 @@ def compare_previous_state(
state_path = os.path.join(project.test_data_dir, f"state/v{compare_manifest_version}")
cli_args = [
"list",
"--resource-types",
"model",
"--select",
"state:modified",
"--state",
state_path,
]
if expect_pass:
results = run_dbt(cli_args, expect_pass=expect_pass)
# We have different numbers of nodes in older versions
if compare_manifest_version < 7:
assert len(results) == 5
else:
assert len(results) == 1
assert len(results) == 0
else:
with pytest.raises(IncompatibleSchemaError):
run_dbt(cli_args, expect_pass=expect_pass)
Expand Down