From 8edcc3d432e45cc764286467334ee02312ce35a6 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Thu, 28 Sep 2023 14:47:20 -0500 Subject: [PATCH] pass param to second command, add test --- dbt_meshify/main.py | 1 + tests/integration/test_group_command.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/dbt_meshify/main.py b/dbt_meshify/main.py index 1e5deb6..9c3001f 100644 --- a/dbt_meshify/main.py +++ b/dbt_meshify/main.py @@ -629,6 +629,7 @@ def group( ] ), project_path=project_path, + read_catalog=read_catalog, ) return group_changes + contract_changes diff --git a/tests/integration/test_group_command.py b/tests/integration/test_group_command.py index f4ea983..1c8e22b 100644 --- a/tests/integration/test_group_command.py +++ b/tests/integration/test_group_command.py @@ -75,3 +75,27 @@ def test_command_raises_exception_invalid_paths(): assert result.exit_code != 0 assert "does not contain a dbt project" in result.stdout + + +def test_read_catalog_group(): + """Verify that proving an invalid project path raises the correct error.""" + setup_test_project(src_path_string, dest_path_string) + runner = CliRunner() + result = runner.invoke( + cli, + [ + "group", + "test_group", + "--owner-name", + "Teenage Mutant Jinja Turtles", + "--select", + "foo", + "--project-path", + "tests", + "--read-catalog", + ], + ) + + assert result.exit_code != 0 + assert "dbt docs generate" not in result.stdout + teardown_test_project(dest_path_string)