fix: suppress legacy warnings in machine JSON paths
This commit is contained in:
@@ -241,6 +241,7 @@ def test_suggest_fks_json_is_single_deterministic_document_without_writing(tmp_p
|
||||
app, ["schema", "suggest-fks", "--json", "-c", str(cfg), "--from-sql", str(staged)]
|
||||
)
|
||||
assert response.exit_code == 0, response.output
|
||||
assert response.stderr == ""
|
||||
assert response.stdout.count("\n") == 1
|
||||
payload = json.loads(response.stdout)
|
||||
assert payload["status"] == "succeeded"
|
||||
@@ -261,6 +262,7 @@ def test_suggest_fks_json_failure_is_safe_and_single_document(tmp_path):
|
||||
(tmp_path / "artifacts" / "mschema" / "physical.yaml").unlink()
|
||||
response = CliRunner().invoke(app, ["schema", "suggest-fks", "--json", "-c", str(cfg)])
|
||||
assert response.exit_code != 0
|
||||
assert response.stderr == ""
|
||||
assert response.stdout.count("\n") == 1
|
||||
payload = json.loads(response.stdout)
|
||||
assert payload == {"status": "failed", "code": "physical_schema_missing"}
|
||||
@@ -276,6 +278,7 @@ def test_schema_check_json_reports_orphan_count_without_prose(tmp_path):
|
||||
)
|
||||
response = CliRunner().invoke(app, ["schema", "check", "--json", "-c", str(cfg)])
|
||||
assert response.exit_code == 3
|
||||
assert response.stderr == ""
|
||||
assert response.stdout.count("\n") == 1
|
||||
assert json.loads(response.stdout) == {
|
||||
"status": "failed", "code": "annotation_orphans", "orphan_count": 1,
|
||||
@@ -327,11 +330,14 @@ def test_schema_check_json_success_and_reviewed_annotations_are_preserved(tmp_pa
|
||||
|
||||
check = CliRunner().invoke(app, ["schema", "check", "--json", "-c", str(cfg)])
|
||||
assert check.exit_code == 0, check.output
|
||||
assert check.stderr == ""
|
||||
assert check.stdout.count("\n") == 1
|
||||
assert json.loads(check.stdout) == {
|
||||
"status": "succeeded", "code": "ok", "orphan_count": 0, "orphans": []
|
||||
}
|
||||
suggest = CliRunner().invoke(app, ["schema", "suggest-fks", "--json", "-c", str(cfg)])
|
||||
assert suggest.exit_code == 0, suggest.output
|
||||
assert suggest.stderr == ""
|
||||
assert json.loads(suggest.stdout)["candidate_count"] == 0
|
||||
assert annotations_path.read_text() == before
|
||||
|
||||
|
||||
Reference in New Issue
Block a user