Files
moloapp/tests/example/agent/registry/page_test.cpp
T
retoorandClaude Sonnet 5.5 a3396bfc68 feat(clients): sessions+registry+optimize+armor: close gaps, loud list truncation, shared Gemini adapter
sessions: operations get/list/cancel/delete/wait for engine, session, memory and
serving profile; servingProfiles CRUD. registry: ListResult with truncated flag,
v1alpha twins, gateway/policy operations, authz IAM, deny policy update, boundary
patch/bindings. optimize: make_gemini_model over models::VertexModel (DirectModel
removed), generateSyntheticData, online evaluator operations, trace/log writers.
armor: SecurityAdmin for all SCC v2 methods (attack exposure excluded), documented
agent threat categories, floor settings fixed to location global after live run.
check_discovery.py of all four enforce coverage.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 05:43:13 +02:00

24 lines
1.1 KiB
C++

// Route: GET /agent/registry (page; never calls Google)
#include "support/GoogleRig.hpp"
#include <cstdlib>
using namespace molo::example::test;
using molo::example::fw::Method;
int main() {
setenv("GOOGLE_CLOUD_PROJECT", "test-project", 1);
GoogleRig rig(false);
Fixture f(rig.client);
auto res = f.client->get("/agent/registry");
check(res.status == 200, "status 200 without a credential");
check(contains(res.headers.get("Content-Type"), "text/html"), "html");
check(contains(res.body, "Agent registry") && contains(res.body, "agent_registry.js"), "page and script");
check(contains(res.body, "id=\"r-truncated\""), "page has the loud truncation banner");
check(contains(res.body, "id=\"r-version\"") && contains(res.body, "v1alpha"), "page offers v1alpha");
check(contains(res.body, "ops-gateways"), "page offers the operations lists");
check(f.client->post("/agent/registry").status == 405, "post is 405");
check(f.client->get("/agent/registry/nope").status == 404, "unknown sub route is 404");
check(rig.mock->send_count() == 0, "side effect: no upstream traffic");
return finish("agent/registry");
}