[asterisk-commits] kmoore: trunk r417447 - /trunk/tests/test_cel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 26 21:04:57 CDT 2014


Author: kmoore
Date: Thu Jun 26 21:04:50 2014
New Revision: 417447

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=417447
Log:
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.

Modified:
    trunk/tests/test_cel.c

Modified: trunk/tests/test_cel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_cel.c?view=diff&rev=417447&r1=417446&r2=417447
==============================================================================
--- trunk/tests/test_cel.c (original)
+++ trunk/tests/test_cel.c Thu Jun 26 21:04:50 2014
@@ -130,7 +130,7 @@
 
 #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 @@
 	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 @@
 
 #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)




More information about the asterisk-commits mailing list