From 95db3d4246f96a3aba2eff195dcf604958640d50 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Mon, 19 Jan 2015 09:57:05 +0100 Subject: [PATCH] add a second child and mock server --- tests/pam_test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/pam_test.c b/tests/pam_test.c index 121e458..f591913 100644 --- a/tests/pam_test.c +++ b/tests/pam_test.c @@ -133,7 +133,7 @@ static int test_authenticate1(void) { static int test_authenticate2(void) { char *cfg[] = { "id=1", - "urllist=http://localhost:8888/wsapi/2/verify", + "urllist=http://localhost:8888/wsapi/2/verify;http://localhost:8889/wsapi/2/verify", "authfile=aux/authfile", "debug", }; @@ -153,6 +153,7 @@ static pid_t run_mock(const char *port) { int main () { int ret = 0; pid_t child = run_mock("8888"); + pid_t child2 = run_mock("8889"); if(test_authenticate1() != 0) { ret = 1; @@ -165,6 +166,7 @@ int main () { out: kill(child, 9); - printf("killed %d\n", child); + kill(child2, 9); + printf("killed %d and %d\n", child, child2); return ret; }