Asterisk - The Open Source Telephony Project
18.5.0
|
Test endpoints. More...
#include "asterisk.h"
#include "asterisk/astobj2.h"
#include "asterisk/channel.h"
#include "asterisk/endpoints.h"
#include "asterisk/module.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/stasis_endpoints.h"
#include "asterisk/stasis_test.h"
#include "asterisk/test.h"
Go to the source code of this file.
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (state_changes) | |
AST_TEST_DEFINE (cache_clear) | |
AST_TEST_DEFINE (channel_messages) | |
static int | cache_update (struct stasis_message *msg, const void *data) |
Message matcher looking for cache update messages. More... | |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Endpoint stasis-related testing" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .requires = "res_stasis_test", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const char * | test_category = "/stasis/endpoints/" |
Test endpoints.
Definition in file test_stasis_endpoints.c.
|
static |
Definition at line 297 of file test_stasis_endpoints.c.
|
static |
Definition at line 297 of file test_stasis_endpoints.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 297 of file test_stasis_endpoints.c.
AST_TEST_DEFINE | ( | state_changes | ) |
Definition at line 70 of file test_stasis_endpoints.c.
References ao2_cleanup, ast_endpoint_create(), AST_ENDPOINT_OFFLINE, ast_endpoint_set_max_channels(), ast_endpoint_set_state(), ast_endpoint_shutdown(), ast_endpoint_snapshot_type(), ast_endpoint_topic(), ast_hangup(), AST_TEST_NOT_RUN, AST_TEST_PASS, sip_to_pjsip::info(), ast_endpoint_snapshot::max_channels, NULL, RAII_VAR, stasis_message_data(), stasis_message_sink_cb(), stasis_message_sink_create(), stasis_message_sink_wait_for_count(), stasis_message_type(), STASIS_SINK_DEFAULT_WAIT, stasis_subscribe, stasis_unsubscribe(), ast_endpoint_snapshot::state, sub, test_category, TEST_EXECUTE, TEST_INIT, and type.
AST_TEST_DEFINE | ( | cache_clear | ) |
Definition at line 126 of file test_stasis_endpoints.c.
References ao2_cleanup, ast_endpoint_create(), ast_endpoint_shutdown(), ast_endpoint_snapshot_type(), ast_endpoint_topic_all_cached(), ast_hangup(), AST_TEST_NOT_RUN, AST_TEST_PASS, cache_update(), sip_to_pjsip::info(), stasis_cache_update::new_snapshot, NULL, stasis_cache_update::old_snapshot, RAII_VAR, ast_endpoint_snapshot::resource, stasis_cache_update_type(), stasis_message_data(), stasis_message_sink_cb(), stasis_message_sink_create(), stasis_message_sink_wait_for(), stasis_message_type(), STASIS_SINK_DEFAULT_WAIT, stasis_subscribe, stasis_unsubscribe(), sub, ast_endpoint_snapshot::tech, test_category, TEST_EXECUTE, TEST_INIT, type, stasis_cache_update::type, and update().
AST_TEST_DEFINE | ( | channel_messages | ) |
Definition at line 206 of file test_stasis_endpoints.c.
References ao2_cleanup, ast_channel_alloc, ast_channel_snapshot_type(), ast_endpoint_add_channel(), ast_endpoint_create(), ast_endpoint_shutdown(), ast_endpoint_snapshot_type(), ast_endpoint_topic(), ast_hangup(), AST_STATE_DOWN, AST_TEST_NOT_RUN, AST_TEST_PASS, sip_to_pjsip::info(), NULL, ast_endpoint_snapshot::num_channels, RAII_VAR, stasis_message_data(), stasis_message_sink_cb(), stasis_message_sink_create(), stasis_message_sink_wait_for_count(), stasis_message_type(), STASIS_SINK_DEFAULT_WAIT, stasis_subscribe, stasis_unsubscribe(), sub, test_category, TEST_EXECUTE, TEST_INIT, and type.
|
static |
Message matcher looking for cache update messages.
Definition at line 48 of file test_stasis_endpoints.c.
References ast_endpoint_snapshot_type(), name, stasis_cache_update::new_snapshot, stasis_cache_update::old_snapshot, ast_endpoint_snapshot::resource, stasis_cache_update_type(), stasis_message_data(), stasis_message_type(), stasis_cache_update::type, and update().
Referenced by AST_TEST_DEFINE(), and consumer_exec().
|
static |
Definition at line 284 of file test_stasis_endpoints.c.
References AST_MODFLAG_DEFAULT, AST_MODULE_INFO(), AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_CORE, AST_TEST_REGISTER, ASTERISK_GPL_KEY, and unload_module().
|
static |
Definition at line 276 of file test_stasis_endpoints.c.
References AST_TEST_UNREGISTER.
Referenced by load_module().
|
static |
Definition at line 297 of file test_stasis_endpoints.c.
|
static |
Definition at line 297 of file test_stasis_endpoints.c.
|
static |
Definition at line 45 of file test_stasis_endpoints.c.
Referenced by AST_TEST_DEFINE().