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,17 @@
|
||||
// Route: GET /sessions/counter (signed cookie session)
|
||||
#include "support/Assert.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
|
||||
int main() {
|
||||
Fixture f;
|
||||
auto first = f.client->get("/sessions/counter");
|
||||
check(first.status == 200, "status 200");
|
||||
check(contains(first.body, "\"count\":1"), "counter starts at 1");
|
||||
check(contains(first.body, "\"fresh\":true"), "first visit is fresh");
|
||||
check(first.headers.has("Set-Cookie"), "session cookie set");
|
||||
auto second = f.client->get("/sessions/counter");
|
||||
check(contains(second.body, "\"count\":2"), "jar keeps session");
|
||||
check(contains(second.body, "\"fresh\":false"), "second visit resumes");
|
||||
return finish("sessions/counter");
|
||||
}
|
||||
Reference in New Issue
Block a user