feat(clients): registry: Agent Registry, Agent Gateway, Agent Identity from discovery call table
86-row call table checked against Google discovery documents, typed services, local approval ledger, live read-only tests, /agent/registry demo. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// 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(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");
|
||||
}
|
||||
Reference in New Issue
Block a user