-
Notifications
You must be signed in to change notification settings - Fork 254
Chore: handle v3 commands in CLI #2547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
6613ee6
f2dd6cb
e728ccf
21f0511
8b54237
34a81c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| from unittest.mock import patch | ||
|
|
||
| import pytest | ||
| from soda_core.cli.cli import create_cli_parser | ||
| from soda_core.cli.cli import create_cli_parser, execute | ||
| from soda_core.cli.exit_codes import ExitCode | ||
| from soda_core.common.logs import Logs | ||
|
|
||
|
|
@@ -396,3 +396,20 @@ def test_cli_argument_mapping_for_soda_cloud_test_command(mock_handler): | |
| assert e.value.code == 0 | ||
|
|
||
| mock_handler.assert_called_once_with("sc.yaml") | ||
|
|
||
|
|
||
| def test_cli_v3_scan(): | ||
| sys.argv = [ | ||
| "soda", | ||
| "scan", | ||
| "-d", | ||
| "ds", | ||
| "-c", | ||
| "sodacl_snowflake/configuration.yml", | ||
| "sodacl_pg/checks.yml", | ||
| ] | ||
|
|
||
| with pytest.raises(SystemExit) as e: | ||
| execute() | ||
|
|
||
| assert e.value.code == 3 | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For maintainability,
legacy_cmdswould be clearer as a module-level constant (and preferably aset/frozensetfor membership checks). That also makes it easier to reuse the same source of truth from tests.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback