diff --git a/test/testrpc.cpp b/test/testrpc.cpp index 7ce192c..d18a8bb 100644 --- a/test/testrpc.cpp +++ b/test/testrpc.cpp @@ -7,6 +7,7 @@ #define PVXS_ENABLE_EXPERT_API #include +#include #include @@ -21,6 +22,7 @@ #include #include #include +#include "utilpvt.h" namespace { using namespace pvxs; @@ -236,13 +238,45 @@ struct Tester { cli = client::Context(); op.reset(); } + + void serversrc() + { + using namespace pvxs::members; + testShow()<<__func__; + + serv.start(); + + std::string servaddr = SB()<<"127.0.0.1:"<wait(5.0)); + + shared_array channels({"mailbox"}); + testArrEq(result["value"].as>(), channels); + } + + { + Value query = nt::NTURI({}).call(); + auto result(cli.rpc("server", uri.call("info")) + .server(servaddr).exec()->wait(5.0)); + + testEq(result["implLang"].as(), "cpp"); + testStrMatch("PVXS.*", result["version"].as()); + } + } }; } // namespace MAIN(testrpc) { - testPlan(20); + testPlan(23); testSetup(); Tester().echo(); Tester().lazy(); @@ -252,6 +286,7 @@ MAIN(testrpc) Tester().error(); Tester().builder(); Tester().orphan(); + Tester().serversrc(); cleanup_for_valgrind(); return testDone(); }