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,24 @@
|
||||
// Route: GET /agent/runtime/status and /agent/runtime/calls
|
||||
#include "support/GoogleRig.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
|
||||
int main() {
|
||||
setenv("GOOGLE_CLOUD_PROJECT", "test-project", 1);
|
||||
GoogleRig off(false);
|
||||
Fixture f(off.client);
|
||||
auto res = f.client->get("/agent/runtime/status");
|
||||
check(res.status == 200, "status 200");
|
||||
check(contains(res.body, "\"configured\":false"), "reports no credential");
|
||||
check(contains(res.body, "\"project_set\":true"), "project read from env");
|
||||
auto calls = f.client->get("/agent/runtime/calls");
|
||||
check(calls.status == 200, "calls 200");
|
||||
check(contains(calls.body, "aiplatform.projects.locations.reasoningEngines.streamQuery"), "table lists streamQuery");
|
||||
check(contains(calls.body, "v1beta1/{+name}:query"), "table lists runtime revision query");
|
||||
GoogleRig on;
|
||||
Fixture g(on.client);
|
||||
check(contains(g.client->get("/agent/runtime/status").body, "\"configured\":true"), "reports credential");
|
||||
check(f.client->post("/agent/runtime/status", "{}", "application/json").status == 405, "post is 405");
|
||||
check(on.mock->send_count() == 0, "no network");
|
||||
return finish("agent/runtime/status");
|
||||
}
|
||||
Reference in New Issue
Block a user