From: Kinsey Moore Date: Fri, 27 Jun 2014 02:04:50 +0000 (+0000) Subject: CEL: Update unit tests for bridge tech field X-Git-Tag: 13.0.0-beta1~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=512e505dc3e7a8f20a5054c5ee364c7c46d8976f;p=thirdparty%2Fasterisk.git CEL: Update unit tests for bridge tech field Update the CEL unit tests that handle BRIDGE_ENTER and BRIDGE_EXIT events to expect the "bridge_technology" extra field key. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417447 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/tests/test_cel.c b/tests/test_cel.c index 501b99fab1..245a8831c3 100644 --- a/tests/test_cel.c +++ b/tests/test_cel.c @@ -130,7 +130,7 @@ static void do_sleep(void) #define BRIDGE_EXIT_EVENT_PEER(channel, bridge, peer) do { \ RAII_VAR(struct ast_json *, extra, NULL, ast_json_unref); \ - extra = ast_json_pack("{s: s}", "bridge_id", bridge->uniqueid); \ + extra = ast_json_pack("{s: s, s: s}", "bridge_id", bridge->uniqueid, "bridge_technology", bridge->technology->name); \ ast_test_validate(test, extra != NULL); \ APPEND_EVENT_PEER(channel, AST_CEL_BRIDGE_EXIT, NULL, extra, peer); \ } while (0) @@ -140,7 +140,7 @@ static void do_sleep(void) RAII_VAR(struct ast_str *, peer_str, NULL, ast_free); \ peer_str = test_cel_generate_peer_str_snapshot(channel, bridge); \ ast_test_validate(test, peer_str != NULL); \ - extra = ast_json_pack("{s: s}", "bridge_id", bridge->uniqueid); \ + extra = ast_json_pack("{s: s, s: s}", "bridge_id", bridge->uniqueid, "bridge_technology", bridge->technology->name); \ ast_test_validate(test, extra != NULL); \ APPEND_EVENT_SNAPSHOT(channel, AST_CEL_BRIDGE_EXIT, NULL, extra, ast_str_buffer(peer_str)); \ } while (0) @@ -161,7 +161,7 @@ static void do_sleep(void) #define BRIDGE_ENTER_EVENT_PEER(channel, bridge, peer) do { \ RAII_VAR(struct ast_json *, extra, NULL, ast_json_unref); \ - extra = ast_json_pack("{s: s}", "bridge_id", bridge->uniqueid); \ + extra = ast_json_pack("{s: s, s: s}", "bridge_id", bridge->uniqueid, "bridge_technology", bridge->technology->name); \ ast_test_validate(test, extra != NULL); \ APPEND_EVENT_PEER(channel, AST_CEL_BRIDGE_ENTER, NULL, extra, peer); \ } while (0)