Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into fix_7390
  • Loading branch information
aranke authored May 8, 2023
commit 628c1c6b02e6d85c19e417d675a96b4e59babc7c
30 changes: 30 additions & 0 deletions tests/functional/show/test_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,33 @@ def test_limit(self, project, args, expected):
dbt_args = ["show", "--inline", models__second_ephemeral_model, *args]
results, log_output = run_dbt_and_capture(dbt_args)
assert len(results.results[0].agate_table) == expected

def test_seed(self, project):
(results, log_output) = run_dbt_and_capture(["show", "--select", "sample_seed"])
assert "Previewing node 'sample_seed'" in log_output


class TestShowModelVersions:
@pytest.fixture(scope="class")
def models(self):
return {
"schema.yml": schema_yml,
"sample_model.sql": models__sample_model,
"sample_model_v2.sql": models__second_model,
}

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

def test_version_unspecified(self, project):
run_dbt(["build"])
(results, log_output) = run_dbt_and_capture(["show", "--select", "sample_model"])
assert "Previewing node 'sample_model.v1'" in log_output
assert "Previewing node 'sample_model.v2'" in log_output

def test_none(self, project):
run_dbt(["build"])
(results, log_output) = run_dbt_and_capture(["show", "--select", "sample_model.v2"])
assert "Previewing node 'sample_model.v1'" not in log_output
assert "Previewing node 'sample_model.v2'" in log_output
You are viewing a condensed version of this merge commit. You can view the full changes here.