Files
moloapp/tests/example/agent/registry/approve_test.cpp
T
retoorandClaude Sonnet 5.5 cb70bb1116 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>
2026-10-24 04:42:00 +02:00

21 lines
809 B
C++

// Route: POST /agent/registry/approve
#include "agent/registry/cases.hpp"
using namespace molo::example::test;
int main() {
check_google_post_route("/agent/registry/approve",
"{\"name\":\"projects/test-project/locations/us-central1/agents/a1\",\"actor\":\"alice\"}",
"{\"name\":\"agents/a1\",\"actor\":\"alice\"}",
"short asset name");
{
GoogleRig rig;
Fixture f(rig.client);
check(f.client->post("/agent/registry/approve", "{\"name\":\"projects/test-project/locations/us-central1/agents/a1\"}", "application/json").status == 422,
"missing actor is 422");
check(contains(f.client->get("/agent/registry/approvals").body, "\"approvals\":[]"),
"side effect: nothing recorded after rejected requests");
}
return finish("agent/registry/approve");
}