feat(sp37): cyclone submit-batch CLI
Walks batch-*-claims/*.x12 under --ingest-dir, calls submit_file per file, prints submitted/skipped/failed counts. Exits 0 even on per-file failures (details in stdout); exits 2 on config-level errors (no clearhouse, stub mode, missing dir). This is the canonical outbound path; resubmit-rejected-claims remains for one-off cases where no DB row is wanted.
This commit is contained in:
@@ -193,3 +193,16 @@ def test_submit_file_uses_default_paramiko_factory(monkeypatch):
|
||||
)
|
||||
assert result.outcome == SubmitOutcome.SUBMITTED
|
||||
assert len(fake_paramiko_sftp.put_calls) == 1
|
||||
|
||||
|
||||
def test_submit_batch_cli_help():
|
||||
"""`cyclone submit-batch --help` exits 0 and shows the flags."""
|
||||
import subprocess
|
||||
import sys
|
||||
result = subprocess.run(
|
||||
[sys.executable, "-m", "cyclone.cli", "submit-batch", "--help"],
|
||||
capture_output=True, text=True,
|
||||
cwd=str(Path(__file__).parent.parent),
|
||||
)
|
||||
assert result.returncode == 0
|
||||
assert "--ingest-dir" in result.stdout
|
||||
|
||||
Reference in New Issue
Block a user