Files

15 lines
690 B
C++
Raw Permalink Normal View History

// Route: POST /google/enterprise/rank
#include "google/enterprise/cases.hpp"
using namespace molo::example::test;
int main() {
const std::string rc = "projects/p1/locations/global/rankingConfigs/default_ranking_config";
const std::string good =
"{\"ranking_config\":\"" + rc + "\",\"query\":\"q\",\"records\":[{\"id\":\"1\",\"content\":\"a\"}]}";
check_enterprise_post_route("/google/enterprise/rank", good,
"{\"ranking_config\":\"" + rc + "\",\"query\":\"q\",\"records\":[]}", "no records");
check_enterprise_dry_run("/google/enterprise/rank", good, "rankingConfigs/default_ranking_config:rank");
return finish("google/enterprise/rank");
}