mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
add new test
This commit is contained in:
parent
0bf7d8d555
commit
5fcbe14a7f
1 changed files with 21 additions and 0 deletions
|
|
@ -584,6 +584,26 @@ static void transport_change(void){
|
|||
}
|
||||
}
|
||||
|
||||
static void transport_dont_bind(void){
|
||||
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_tcp_rc");
|
||||
stats* counters = &pauline->stat;
|
||||
LCSipTransports tr;
|
||||
|
||||
memset(&tr, 0, sizeof(tr));
|
||||
tr.udp_port = 0;
|
||||
tr.tcp_port = LC_SIP_TRANSPORT_DONTBIND;
|
||||
tr.tls_port = LC_SIP_TRANSPORT_DONTBIND;
|
||||
|
||||
linphone_core_set_sip_transports(pauline->lc, &tr);
|
||||
BC_ASSERT_TRUE(wait_for_until(pauline->lc,pauline->lc,&counters->number_of_LinphoneRegistrationOk,2,9000));
|
||||
memset(&tr, 0, sizeof(tr));
|
||||
linphone_core_get_sip_transports_used(pauline->lc, &tr);
|
||||
BC_ASSERT_EQUAL(tr.udp_port, 0, int, "%i");
|
||||
BC_ASSERT_EQUAL(tr.tcp_port, LC_SIP_TRANSPORT_DONTBIND, int, "%i");
|
||||
BC_ASSERT_EQUAL(tr.tls_port, LC_SIP_TRANSPORT_DONTBIND, int, "%i");
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
||||
static void proxy_transport_change(void){
|
||||
LinphoneCoreManager* lcm = create_lcm();
|
||||
stats* counters = &lcm->stat;
|
||||
|
|
@ -1126,6 +1146,7 @@ test_t register_tests[] = {
|
|||
TEST_NO_TAG("Register with refresh and send error", register_with_refresh_with_send_error),
|
||||
TEST_NO_TAG("Multi account", multiple_proxy),
|
||||
TEST_NO_TAG("Transport changes", transport_change),
|
||||
TEST_NO_TAG("Transport configured with dontbind option", transport_dont_bind),
|
||||
TEST_NO_TAG("Proxy transport changes", proxy_transport_change),
|
||||
TEST_NO_TAG("Proxy transport changes with wrong address at first", proxy_transport_change_with_wrong_port),
|
||||
TEST_NO_TAG("Proxy transport changes with wrong address, giving up",proxy_transport_change_with_wrong_port_givin_up),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue