Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Websocket Client Unit Tests. More...
#include "asterisk.h"
#include "asterisk/test.h"
#include "asterisk/module.h"
#include "asterisk/astobj2.h"
#include "asterisk/pbx.h"
#include "asterisk/http_websocket.h"
Go to the source code of this file.
Macros | |
#define | CATEGORY "/res/websocket/" |
#define | REMOTE_URL "ws://127.0.0.1:8088/ws" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (websocket_client_bad_url) | |
AST_TEST_DEFINE (websocket_client_create_and_connect) | |
AST_TEST_DEFINE (websocket_client_multiple_protocols) | |
AST_TEST_DEFINE (websocket_client_unsupported_protocol) | |
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 = "Websocket client test module" , .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_http_websocket", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
Websocket Client Unit Tests.
Definition in file test_websocket_client.c.
#define CATEGORY "/res/websocket/" |
Definition at line 41 of file test_websocket_client.c.
#define REMOTE_URL "ws://127.0.0.1:8088/ws" |
Definition at line 42 of file test_websocket_client.c.
|
static |
Definition at line 165 of file test_websocket_client.c.
|
static |
Definition at line 165 of file test_websocket_client.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 165 of file test_websocket_client.c.
AST_TEST_DEFINE | ( | websocket_client_bad_url | ) |
Definition at line 74 of file test_websocket_client.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_websocket_client_create(), CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, result, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | websocket_client_create_and_connect | ) |
Definition at line 44 of file test_websocket_client.c.
References ao2_cleanup, ast_free, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_websocket_client_create(), ast_websocket_read_string(), ast_websocket_write_string(), CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, REMOTE_URL, result, TEST_EXECUTE, TEST_INIT, and write_buf().
AST_TEST_DEFINE | ( | websocket_client_multiple_protocols | ) |
Definition at line 116 of file test_websocket_client.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_websocket_client_accept_protocol(), ast_websocket_client_create(), CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, REMOTE_URL, result, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | websocket_client_unsupported_protocol | ) |
Definition at line 95 of file test_websocket_client.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_websocket_client_create(), CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, REMOTE_URL, result, TEST_EXECUTE, and TEST_INIT.
|
static |
Definition at line 142 of file test_websocket_client.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
Definition at line 151 of file test_websocket_client.c.
References AST_TEST_UNREGISTER.
|
static |
Definition at line 165 of file test_websocket_client.c.
|
static |
Definition at line 165 of file test_websocket_client.c.