summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-06-21 12:58:09 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-06-21 12:58:09 +0200
commit83db43bc9d1e31beb0b4d80c2a8a7d9d6488f243 (patch)
treed7c72f688d1af1ea3be8ffd14fcb6707872794cb /test
parent599b548213b0f18b8b23050e894fabeea527e72b (diff)
test: count total requests on sip servers
Diffstat (limited to 'test')
-rw-r--r--test/ua.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/ua.c b/test/ua.c
index 6a131ea..c2b0224 100644
--- a/test/ua.c
+++ b/test/ua.c
@@ -473,6 +473,7 @@ static int reg_auth_dns(enum sip_transp tp)
char aor[256];
char srv[256];
unsigned i;
+ unsigned total_req = 0;
int err;
memset(&t, 0, sizeof t);
@@ -568,11 +569,18 @@ static int reg_auth_dns(enum sip_transp tp)
goto out;
}
- /* verify that all SIP requests was sent to the first
- * SIP-server.
+ /* verify that all SIP requests was sent to the
+ * SIP-servers.
*/
- ASSERT_TRUE(t.srvv[0]->n_register_req > 0);
- ASSERT_EQ(tp, t.srvv[0]->tp_last);
+ for (i=0; i<server_count; i++) {
+
+ total_req += t.srvv[i]->n_register_req;
+
+ if (t.srvv[i]->n_register_req) {
+ ASSERT_EQ(tp, t.srvv[i]->tp_last);
+ }
+ }
+ ASSERT_TRUE(total_req >= 2);
ASSERT_TRUE(t.got_register_ok > 0);
out: