Files
retoor 3c4334cec9 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.
2026-10-23 18:20:04 +02:00

20 lines
707 B
C++

// 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");
}