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,19 @@
|
||||
// Route: /kv/items
|
||||
#include "support/Assert.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
|
||||
int main() {
|
||||
Fixture f;
|
||||
auto missing = f.client->get("/kv/items?key=nope");
|
||||
check(missing.status == 404, "missing key is 404");
|
||||
auto bad = f.client->post("/kv/items", "{\"key\":\"a\"}",
|
||||
"application/json");
|
||||
check(bad.status == 400, "key without value is 400");
|
||||
auto put = f.client->post("/kv/items", "{\"key\":\"a\",\"value\":\"b\"}",
|
||||
"application/json");
|
||||
check(put.status == 201, "store status 201");
|
||||
auto get = f.client->get("/kv/items?key=a");
|
||||
check(contains(get.body, "\"value\":\"b\""), "round trip works");
|
||||
return finish("kv/items");
|
||||
}
|
||||
Reference in New Issue
Block a user