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,16 @@
|
||||
// Route: GET /tenancy/t/{tenant}/whoami (path resolution)
|
||||
#include "support/Assert.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
using molo::example::fw::Method;
|
||||
|
||||
int main() {
|
||||
Fixture f;
|
||||
auto ok = f.client->get("/tenancy/t/acme/whoami");
|
||||
check(ok.status == 200 && contains(ok.body, "\"source\":\"path\"") && contains(ok.body, "pro"), "path tenant");
|
||||
check(f.client->get("/tenancy/t/x/whoami").status == 400, "too short id");
|
||||
check(f.client->get("/tenancy/t/ghost/whoami").status == 404, "unknown 404");
|
||||
auto h = f.client->request(Method::Get, "/tenancy/t/acme/whoami", "", {{"X-Tenant-ID", "globex"}});
|
||||
check(contains(h.body, "globex"), "header beats path");
|
||||
return finish("tenancy/t/tenant/whoami");
|
||||
}
|
||||
Reference in New Issue
Block a user