Files
moloapp/tests/example/index_test.cpp
T
retoor 0595284fe3 feat(doos): add container runtime, audit cases, example demo and tests
- New rootless doos container runtime: sandbox, cgroup, network, images, hardening, davmount, CLI plus molo integration
- 18 CVE audit reproductions with READMEs and Makefiles
- Example DoosDemo routes, IndexCatalog, static assets, spec update
- CLI serve on 0.0.0.0:8000, arg parser, dev server improvements
- Runtime HTTP fixes, supervisor isolation backend
- Tests for doos, example doos routes, CLI serve; suite count 261 to 265
2026-11-06 04:36:00 +01:00

27 lines
1.3 KiB
C++

// Route: GET / (index, template inheritance, coverage matrix)
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto res = f.client->get("/");
check(res.status == 200, "status 200");
check(contains(res.headers.get("Content-Type"), "text/html"),
"html content type");
check(contains(res.body, "Living example"), "matrix heading");
check(contains(res.body, "/routing/hello/world"), "matrix links a route");
check(contains(res.body, "viewport"), "responsive viewport meta");
check(contains(res.body, "nav-narrow"), "narrow nav dropdown present");
check(contains(res.body, "id=\"g-routing\""), "routing group section");
check(contains(res.body, "id=\"g-vendors\""), "vendor group section");
check(contains(res.body, "needs API key"), "key badge on credentialed groups");
check(contains(res.body, "id=\"filter\""), "filter box");
check(contains(res.body, "<a href=\"/routing/hello/world\">Routing</a>"),
"row shows a readable name linking the route");
check(contains(res.body, "<a href=\"/ai/openai\">AI OpenAI</a>"), "acronyms prettified");
check(!contains(res.body, "g-other"), "every registered route is grouped");
check(res.headers.has("X-Request-ID"), "request id middleware ran");
return finish("index");
}