from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]
def test_v034_files():
    for p in ['app/api/v034.py','app/services/deployment_v034.py','app/static/deployment-center.html','migrations/034_enterprise_deployment_observability.sql']:
        assert (ROOT/p).exists()
def test_v034_controls():
    text=(ROOT/'app/services/deployment_v034.py').read_text()
    for item in ['default_checklist','recalc_project','run_diagnostics','create_native_backup','checksum_sha256']:
        assert item in text
def test_v034_routes():
    text=(ROOT/'app/api/v034.py').read_text()
    for route in ['/implementation-projects','/diagnostics','/backups','/releases','/plan-update']:
        assert route in text
def test_v034_rls():
    sql=(ROOT/'migrations/034_enterprise_deployment_observability.sql').read_text()
    assert 'ROW LEVEL SECURITY' in sql and 'WITH CHECK' in sql and 'app.current_tenant_id' in sql
