21 lines
923 B
C++
21 lines
923 B
C++
// Route: GET /agent/registry/calls (the declared call table)
|
|||
|
|
#include "support/GoogleRig.hpp"
|
||
|
|
#include <cstdlib>
|
||
|
|
|
||
|
|
using namespace molo::example::test;
|
||
|
|
using molo::example::fw::Method;
|
||
|
|
|
||
|
|
int main() {
|
||
|
|
GoogleRig rig(false);
|
||
|
|
Fixture f(rig.client);
|
||
|
|
auto res = f.client->get("/agent/registry/calls");
|
||
|
|
check(res.status == 200, "status 200");
|
||
|
|
check(contains(res.headers.get("Content-Type"), "application/json"), "json");
|
||
|
|
check(contains(res.body, "\"id\":\"agentregistry.v1.agents.search\""), "registry search declared");
|
||
|
|
check(contains(res.body, "networkservices.projects.locations.agentGateways.create"), "gateway create declared");
|
||
|
|
check(contains(res.body, "v1alpha/{+parent}/skills"), "alpha skills path declared");
|
||
|
|
check(f.client->post("/agent/registry/calls").status == 405, "post is 405");
|
||
|
|
check(rig.mock->send_count() == 0, "side effect: no upstream traffic");
|
||
|
|
return finish("agent/registry/calls");
|
||
|
|
}
|