Skip to content

test(orm): cover synchronous CRUD on real MySQL - #106

Merged
Antruly merged 1 commit into
masterfrom
test/orm-cross-backend
Nov 27, 2026
Merged

Antruly merged 1 commit into
masterfrom
test/orm-cross-backend

Conversation

@Antruly

@Antruly Antruly commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Part of #93. Parent: #88.

What changed

  • New tests/functional/orm_mysql_func.cpp: real MySQL synchronous ORM CRUD — create table, auto-increment id, point lookup, nullable reset, UPDATE, find_all + total, COUNT, DELETE, unique-key error pass-through, and find-after-delete = NOT_FOUND.
  • The test reads UVCPP_ORM_TEST_MYSQL_URL, falling back to UVCPP_DB_TEST_MYSQL_URL; no URL → exit 3 (Skipped), UVCPP_DB_TEST_REQUIRE=1 → exit 1. It is excluded from the target list when the MySQL backend is not compiled, so there is no green SKIP.
  • Ubuntu db-servers job now passes -DUVCPP_BUILD_ORM=ON and requires test_orm_mysql_func registration alongside the existing MySQL/PostgreSQL/MongoDB db tests.
  • doc/ci-guide.md and doc/orm-guide.md record exactly what is covered: real MySQL synchronous ORM CRUD; PostgreSQL ORM CRUD, transactions, async and ODBC remain unverified.

Verification

Real MySQL 8.0.46, unprivileged temporary instance on 127.0.0.1:33099:

[orm_mysql] checks=24 failures=0
[PASS] orm_mysql
rc=0

ctest with URL:

1/1 Test #33: test_orm_mysql_func ... Passed

ctest without URL:

***Skipped
The following tests did not run:
  33 - test_orm_mysql_func (Skipped)

Strict C++11:

g++ -std=c++11 -pedantic-errors -Wall -Wextra ... -c
rc=0

MySQL backend excluded from a SQLite-only tree:

no test_orm_mysql_func target registered

Docs/CI gates:

check_docs.py       rc=0, 3/3
check_doc_lines.py  rc=0, 5/5
check_ci_layout.py  rc=0, 4 platform files / 7-row table / 16 badges

Unverified

  • PostgreSQL ORM CRUD/transactions/async: no PostgreSQL server binaries in this environment.
  • ODBC ORM: no data source/driver.
  • MySQL ORM transactions/async: the MySQL test is synchronous CRUD only.
  • The GitHub Actions job itself has not run yet; this PR is based on the equivalent local build with the MySQL backend and a real server.

Add orm_mysql_func under the same exit-3 URL contract as the db remote-backend tests, exclude it when the MySQL backend is not compiled, and extend the Ubuntu db-servers job with ORM=ON so the test runs against its MySQL 8 service. Document that PostgreSQL and ODBC ORM coverage is still open.
@Antruly

Antruly commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Local review before merge: 24/24 checks against a real MySQL 8.0.46 server, target is absent when MySQL is not compiled, URL-less run is ctest-Skipped, strict C++11 compiles clean, and docs/CI gates pass. PostgreSQL/ODBC and MySQL transactions/async are explicitly not claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant