diff options
Diffstat (limited to 'common/elapi/elapi_test')
-rw-r--r-- | common/elapi/elapi_test/Makefile.am | 1 | ||||
-rw-r--r-- | common/elapi/elapi_test/elapi_ut.c | 30 |
2 files changed, 30 insertions, 1 deletions
diff --git a/common/elapi/elapi_test/Makefile.am b/common/elapi/elapi_test/Makefile.am index dcf1707c..c0eac8a5 100644 --- a/common/elapi/elapi_test/Makefile.am +++ b/common/elapi/elapi_test/Makefile.am @@ -32,6 +32,7 @@ libelapi_test_la_SOURCES = \ ../elapi_basic.h \ ../elapi_resolve.c \ ../elapi_async.c \ + ../elapi_subst.c \ ../elapi_event.h \ ../elapi_priv.h \ ../elapi_sink.h \ diff --git a/common/elapi/elapi_test/elapi_ut.c b/common/elapi/elapi_test/elapi_ut.c index 1046ed0e..ab0f88d1 100644 --- a/common/elapi/elapi_test/elapi_ut.c +++ b/common/elapi/elapi_test/elapi_ut.c @@ -76,7 +76,7 @@ int simple_event_test(void) printf("Simple test START:\n"); error = elapi_set_default_template( - E_BASE_DEFV1 | E_BASE_HOSTEXT, + E_BASE_DEFV1 | E_BASE_HOSTEXT /* FIXME Ticket #207 */, "%n( bin )", bin, 8, " %sb( logical1 )", "false", "%sb( logical2 )", "YES", @@ -391,6 +391,34 @@ int complex_event_test(void) return error; } + error = elapi_dsp_msg(E_TARGET_DEBUG, + dispatcher, + template, + E_MESSAGE, + "date = %(R_stamp__), pid = %(__pid__), " + "hostname = %(__host__), %(__halias__), " + "ip = %(__ip__), [%(__iplist__);%(!__iplist__);%(__iplist__)]" , + E_EOARG); + if (error) { + elapi_destroy_event_template(template); + printf("Failed to log event! %d\n", error); + return error; + } + + error = elapi_dsp_msg(E_TARGET_DEBUG, + dispatcher, + template, + E_MESSAGE, + "date = %(R_stamp__), pid = %(__pid__), " + "hostname = %(__host__), %(__halias__), " + "ip = %(__ip__), [%(__iplist__);%(__iplist__);%(__iplist__)]" , + E_EOARG); + if (error) { + elapi_destroy_event_template(template); + printf("Failed to log event! %d\n", error); + return error; + } + elapi_destroy_event_template(template); elapi_print_dispatcher(dispatcher); |