feat(clients): runtime: Agent Engine reasoningEngines client, discovery-checked call table, typed deployment spec, demo routes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// Route: POST /agent/runtime/get
|
||||
#include "support/GoogleRig.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
|
||||
int main() {
|
||||
setenv("GOOGLE_CLOUD_PROJECT", "test-project", 1);
|
||||
GoogleRig rig(false);
|
||||
Fixture f(rig.client);
|
||||
auto res = f.client->post("/agent/runtime/get", "{\"id\":\"123\"}", "application/json");
|
||||
check(res.status == 503 && contains(res.body, "google_not_configured"), "no credential is 503");
|
||||
check(f.client->post("/agent/runtime/get", "{}", "application/json").status == 422, "missing id is 422");
|
||||
check(f.client->post("/agent/runtime/get", "{\"id\":\"../x\"}", "application/json").status == 422, "traversal id is 422");
|
||||
check(f.client->post("/agent/runtime/get", "{\"id\":\"a/b\"}", "application/json").status == 422, "slash id is 422");
|
||||
check(f.client->get("/agent/runtime/get").status == 405, "get is 405");
|
||||
check(rig.mock->send_count() == 0, "nothing reached Google");
|
||||
return finish("agent/runtime/get");
|
||||
}
|
||||
Reference in New Issue
Block a user