feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security, data, app, realtime, supervisor, clients, CLI, example plus enterprise tenancy, audit, operability, governance, supplychain. Postgres via docker compose for tests.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// Route: /orm/users (dual backends, auto-sync self-healing)
|
||||
#include "support/Assert.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
|
||||
int main() {
|
||||
Fixture f;
|
||||
auto first = f.client->get("/orm/users?backend=sqlite");
|
||||
check(first.status == 200, "sqlite status 200");
|
||||
check(contains(first.body, "\"healed\":true"), "table auto-created");
|
||||
auto insert = f.client->post("/orm/users?backend=sqlite",
|
||||
"{\"name\":\"ada\"}", "application/json");
|
||||
check(insert.status == 201, "insert status 201");
|
||||
auto widen = f.client->post("/orm/users?backend=sqlite",
|
||||
"{\"name\":\"g\",\"email\":\"g@x.io\"}",
|
||||
"application/json");
|
||||
check(contains(widen.body, "auto-added column email"),
|
||||
"new column self-healed");
|
||||
auto pg = f.client->get("/orm/users?backend=postgres");
|
||||
check(contains(pg.body, "\"backend\":\"postgres\""),
|
||||
"postgres backend selected");
|
||||
check(!f.services.sqlite->tables().empty(), "side effect: table exists");
|
||||
return finish("orm/users");
|
||||
}
|
||||
Reference in New Issue
Block a user