feat(clients): enterprise: Discovery Engine, Dialogflow, Retail, Insights, CES, Recommendations
1080-row Discovery-derived call table, validating Caller, typed facades, demo under /google/enterprise, Discovery checker, live read checks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Route: GET /google/enterprise/calls (the call table)
|
||||
#include "support/GoogleRig.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
|
||||
int main() {
|
||||
GoogleRig rig(false);
|
||||
Fixture f(rig.client);
|
||||
auto res = f.client->get("/google/enterprise/calls?api=discoveryengine&q=servingConfigs.search");
|
||||
check(res.status == 200, "200 without a credential");
|
||||
check(contains(res.body, "servingConfigs.search") && contains(res.body, "v1/{+servingConfig}:search"), "rows shown");
|
||||
check(contains(res.body, "\"truncated\":false"), "not truncated");
|
||||
auto all = f.client->get("/google/enterprise/calls?api=dialogflow-es");
|
||||
check(contains(all.body, "\"truncated\":true") && contains(all.body, "\"cap_items\":200"), "truncation is loud");
|
||||
check(f.client->get("/google/enterprise/calls?api=nope").status == 422, "unknown api is 422");
|
||||
check(f.client->get("/google/enterprise/calls?api=ces&q=" + std::string(101, 'a')).status == 422, "q cap");
|
||||
check(f.client->post("/google/enterprise/calls").status == 405, "post is 405");
|
||||
check(rig.mock->send_count() == 0, "side effect: no upstream traffic");
|
||||
return finish("google/enterprise/calls");
|
||||
}
|
||||
Reference in New Issue
Block a user