// 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"); }