projects
/
trust_router.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #99 from painless-security/jennifer/count_failed_reqs
[trust_router.git]
/
mon
/
tests
/
test_mon_req_decode.c
diff --git
a/mon/tests/test_mon_req_decode.c
b/mon/tests/test_mon_req_decode.c
index
63570b9
..
360be1f
100644
(file)
--- a/
mon/tests/test_mon_req_decode.c
+++ b/
mon/tests/test_mon_req_decode.c
@@
-11,16
+11,6
@@
#include <mon_internal.h>
/**
#include <mon_internal.h>
/**
- * @return reconfigure command
- */
-static MON_REQ *reconfigure()
-{
- MON_REQ *req = mon_req_new(NULL, MON_CMD_RECONFIGURE);
- assert(req);
- return req;
-}
-
-/**
* @return show command with no options
*/
static MON_REQ *show_plain()
* @return show command with no options
*/
static MON_REQ *show_plain()
@@
-52,11
+42,11
@@
static MON_REQ *show_options(const MON_OPT_TYPE *opts)
static MON_REQ *show_all_options()
{
MON_OPT_TYPE opts[] = {
static MON_REQ *show_all_options()
{
MON_OPT_TYPE opts[] = {
- OPT_TYPE_SHOW_
SERIAL
,
+ OPT_TYPE_SHOW_
CONFIG_FILES
,
OPT_TYPE_SHOW_VERSION,
OPT_TYPE_SHOW_UPTIME,
OPT_TYPE_SHOW_VERSION,
OPT_TYPE_SHOW_UPTIME,
- OPT_TYPE_SHOW_TID_REQ
_COUNT
,
- OPT_TYPE_SHOW_TID_REQ_PENDING,
+ OPT_TYPE_SHOW_TID_REQ
S_PROCESSED
,
+ OPT_TYPE_SHOW_TID_REQ
S
_PENDING,
OPT_TYPE_SHOW_ROUTES,
OPT_TYPE_SHOW_COMMUNITIES,
OPT_TYPE_UNKNOWN // terminator
OPT_TYPE_SHOW_ROUTES,
OPT_TYPE_SHOW_COMMUNITIES,
OPT_TYPE_UNKNOWN // terminator
@@
-110,7
+100,7
@@
static int run_test(const char *filename, MON_REQ *(generator)())
req_json_str = read_file(filename);
assert(req_json_str);
req_json_str = read_file(filename);
assert(req_json_str);
- req = mon_req_
decod
e(NULL, req_json_str);
+ req = mon_req_
pars
e(NULL, req_json_str);
assert(req);
assert(equal(req, expected));
assert(req);
assert(equal(req, expected));
@@
-124,9
+114,6
@@
static int run_test(const char *filename, MON_REQ *(generator)())
int main(void)
{
int main(void)
{
- // Test reconfigure command
- assert(run_test("req_reconfigure.test", reconfigure));
-
// Test show command with no options
assert(run_test("req_show_no_options.test", show_plain));
// Test show command with no options
assert(run_test("req_show_no_options.test", show_plain));