|
24 | 24 | --dry-run Print planned output paths without writing scripts. |
25 | 25 | --force Overwrite existing files. Without this, existing files cause a failure. |
26 | 26 | --version Show the flowsh-cli version and exit. |
| 27 | + --schema Show the workflow YAML schema and exit. |
27 | 28 | --help Show this message and exit. |
28 | 29 | """ |
29 | 30 |
|
@@ -469,6 +470,17 @@ def test_cli_exposes_version_without_workflow_argument() -> None: |
469 | 470 | assert result.output.strip().startswith("flowsh-cli ") |
470 | 471 |
|
471 | 472 |
|
| 473 | +def test_cli_exposes_schema_without_workflow_argument() -> None: |
| 474 | + result = runner.invoke(app, ["--schema"]) |
| 475 | + |
| 476 | + assert result.exit_code == 0, result.output |
| 477 | + assert result.stderr == "" |
| 478 | + assert "title: WorkflowFile" in result.output |
| 479 | + assert "const: vars" in result.output |
| 480 | + assert "const: bash" in result.output |
| 481 | + assert "const: agent" in result.output |
| 482 | + |
| 483 | + |
472 | 484 | def test_cli_reports_missing_required_workflow_argument() -> None: |
473 | 485 | result = subprocess.run( |
474 | 486 | [sys.executable, "-m", "flowsh_cli"], |
@@ -934,6 +946,7 @@ def test_uv_console_entrypoint_help_matches_contract() -> None: |
934 | 946 | assert "--dry-run" in result.stdout |
935 | 947 | assert "--force" in result.stdout |
936 | 948 | assert "--version" in result.stdout |
| 949 | + assert "--schema" in result.stdout |
937 | 950 |
|
938 | 951 |
|
939 | 952 | def test_direct_script_entrypoint_help_matches_contract() -> None: |
|
0 commit comments