feat(workflow): example covers security, platform, enterprise and resilience features
105 route tests, matrix crawl, spec and README updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// Route: GET /tenancy/metrics (per-tenant counters)
|
||||
#include "support/Assert.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
using molo::example::fw::Method;
|
||||
|
||||
int main() {
|
||||
Fixture f;
|
||||
check(f.client->get("/tenancy/metrics").status == 200, "empty ok");
|
||||
f.client->request(Method::Get, "/tenancy/data", "", {{"X-Tenant-ID", "acme"}});
|
||||
f.client->request(Method::Get, "/tenancy/data", "", {{"X-Tenant-ID", "acme"}});
|
||||
f.client->request(Method::Get, "/tenancy/data", "", {{"X-Tenant-ID", "globex"}});
|
||||
auto m = f.client->get("/tenancy/metrics");
|
||||
check(contains(m.body, "\"acme\":{\"data.list\":2}"), "acme counted twice");
|
||||
check(contains(m.body, "\"globex\":{\"data.list\":1}"), "globex counted once");
|
||||
check(f.client->post("/tenancy/metrics").status == 405, "405 on post");
|
||||
return finish("tenancy/metrics");
|
||||
}
|
||||
Reference in New Issue
Block a user