summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-10-10 21:31:04 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-10-10 21:31:04 +0200
commit9bb2448da92f476eb82cc0d70c712d9f3abf06ac (patch)
treee52f059dc7f58f3ec047bbc2949055a2f1f19217 /test
parent399dc2bc0c07fbe904742a1f109142be70ab4a56 (diff)
test: enable TCP and TLS for ua registration test
Diffstat (limited to 'test')
-rw-r--r--test/main.c7
-rw-r--r--test/mock/sipsrv.c3
-rw-r--r--test/ua.c4
3 files changed, 6 insertions, 8 deletions
diff --git a/test/main.c b/test/main.c
index 29e8460..f10293a 100644
--- a/test/main.c
+++ b/test/main.c
@@ -70,7 +70,7 @@ int main(void)
str_ncpy(config->sip.local, "127.0.0.1:0", sizeof(config->sip.local));
/* XXX: needed for ua tests */
- err = ua_init("test", true, true, false, false);
+ err = ua_init("test", true, true, true, false);
if (err)
goto out;
@@ -79,10 +79,7 @@ int main(void)
goto out;
#if 1
- ua_stop_all(false);
- err = re_main_timeout(5);
- if (err)
- goto out;
+ ua_stop_all(true);
#endif
re_printf("\x1b[32mOK. %zu tests passed successfully\x1b[;m\n",
diff --git a/test/mock/sipsrv.c b/test/mock/sipsrv.c
index 0707962..c762f73 100644
--- a/test/mock/sipsrv.c
+++ b/test/mock/sipsrv.c
@@ -137,7 +137,8 @@ int sip_server_uri(struct sip_server *srv, char *uri, size_t sz,
if (err)
return err;
- if (re_snprintf(uri, sz, "sip:x:x@%J%s",
+ /* NOTE: angel brackets needed to parse ;transport parameter */
+ if (re_snprintf(uri, sz, "<sip:x:x@%J%s>",
&laddr, sip_transp_param(tp)) < 0)
return ENOMEM;
diff --git a/test/ua.c b/test/ua.c
index a7e3154..e5cc382 100644
--- a/test/ua.c
+++ b/test/ua.c
@@ -102,9 +102,9 @@ int test_ua_register(void)
{
int err = 0;
- err = reg(SIP_TRANSP_UDP);
-#if 0
+ err |= reg(SIP_TRANSP_UDP);
err |= reg(SIP_TRANSP_TCP);
+#ifdef USE_TLS
err |= reg(SIP_TRANSP_TLS);
#endif