Return separate counts of TID reqs that succeed and result in error
[trust_router.git] / mon / tests / test_mon_req_encode.c
index d3ae49c..9fe9b1b 100644 (file)
 
 #define JSON_DUMP_OPTS 0
 
-static char *reconfigure()
-{
-  MON_REQ *req = mon_req_new(NULL, MON_CMD_RECONFIGURE);
-  json_t *req_json = mon_req_encode(req);
-  char *result = json_dumps(req_json, JSON_DUMP_OPTS);
-  assert(req);
-  assert(req_json);
-  assert(result);
-  json_decref(req_json);
-  mon_req_free(req);
-  return result;
-}
-
 static char *show_plain()
 {
   MON_REQ *req = mon_req_new(NULL, MON_CMD_SHOW);
@@ -81,14 +68,6 @@ int main(void)
   MON_OPT_TYPE opts[10];
   char *expected = NULL;
 
-  // Test reconfigure command
-  s = reconfigure();
-  expected = read_file("req_reconfigure.test");
-  assert(expected);
-  assert(strcmp(expected, s) == 0);
-  free(s);
-  free(expected);
-
   // Test show without options
   s = show_plain();
   expected = read_file("req_show_no_options.test");
@@ -110,8 +89,8 @@ int main(void)
   opts[0] = OPT_TYPE_SHOW_CONFIG_FILES;
   opts[1] = OPT_TYPE_SHOW_VERSION;
   opts[2] = OPT_TYPE_SHOW_UPTIME;
-  opts[3] = OPT_TYPE_SHOW_TID_REQ_COUNT;
-  opts[4] = OPT_TYPE_SHOW_TID_REQ_PENDING;
+  opts[3] = OPT_TYPE_SHOW_TID_REQS_PROCESSED;
+  opts[4] = OPT_TYPE_SHOW_TID_REQS_PENDING;
   opts[5] = OPT_TYPE_SHOW_ROUTES;
   opts[6] = OPT_TYPE_SHOW_COMMUNITIES;
   opts[7] = OPT_TYPE_UNKNOWN;