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>
40 lines
1.9 KiB
C++
40 lines
1.9 KiB
C++
// Routes: POST /agent/registry/operations/list, POST /agent/registry/operations/cancel,
|
|
// DELETE /agent/registry/operations (explicit destructive route)
|
|
#include "agent/registry/cases.hpp"
|
|
|
|
using namespace molo::example::test;
|
|
using molo::example::fw::Method;
|
|
|
|
int main() {
|
|
for (const char* scope : {"registry", "gateways", "policies"}) {
|
|
std::string s = scope;
|
|
check_google_post_route("/agent/registry/operations/list", "{\"scope\":\"" + s + "\"}",
|
|
"{\"scope\":\"nowhere\"}", "unknown scope");
|
|
check_google_post_route("/agent/registry/operations/cancel",
|
|
"{\"scope\":\"" + s + "\",\"id\":\"op-1\"}",
|
|
"{\"scope\":\"" + s + "\",\"id\":\"a/b\"}", "bad operation id");
|
|
}
|
|
{
|
|
GoogleRig rig(false);
|
|
Fixture f(rig.client);
|
|
auto del = f.client->request(Method::Delete, "/agent/registry/operations?scope=gateways&id=op-1");
|
|
check(del.status == 503 && contains(del.body, "google_not_configured"),
|
|
"delete operation: 503 without a credential");
|
|
check(rig.mock->send_count() == 0, "side effect: no upstream traffic");
|
|
}
|
|
{
|
|
GoogleRig rig;
|
|
Fixture f(rig.client);
|
|
check(f.client->request(Method::Delete, "/agent/registry/operations?scope=x&id=op-1").status == 422,
|
|
"delete: unknown scope is 422");
|
|
check(f.client->request(Method::Delete, "/agent/registry/operations?scope=policies&id=a..b").status == 422,
|
|
"delete: bad id is 422");
|
|
check(f.client->request(Method::Delete, "/agent/registry/operations").status == 422,
|
|
"delete: missing parameters are 422");
|
|
check(f.client->get("/agent/registry/operations").status == 405, "get never deletes");
|
|
check(f.client->post("/agent/registry/operations").status == 405, "post never deletes");
|
|
check(rig.mock->send_count() == 0, "side effect: rejected before any upstream call");
|
|
}
|
|
return finish("agent/registry/operations");
|
|
}
|