summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-06-04 12:06:53 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-08-01 16:19:41 +0200
commitbbd33e46aa6194c1086939f7cf8538c067186455 (patch)
treead91dc6f2042491e3728d096d7571f7e3b13e73a /src/tests
parent75ee7925a9e289bc24f0ce8a7988cca926b71513 (diff)
downloadsssd_unused-bbd33e46aa6194c1086939f7cf8538c067186455.tar.gz
sssd_unused-bbd33e46aa6194c1086939f7cf8538c067186455.tar.xz
sssd_unused-bbd33e46aa6194c1086939f7cf8538c067186455.zip
Primary server support: basic support in failover code
Now there are two list of servers for each service. If currently selected server is only backup, then an event will be scheduled which tries to get connection to one of primary servers and if it succeeds, it starts using this server instead of the one which is currently connected to.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/fail_over-tests.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/tests/fail_over-tests.c b/src/tests/fail_over-tests.c
index 8d6bdd3d..6f4843ca 100644
--- a/src/tests/fail_over-tests.c
+++ b/src/tests/fail_over-tests.c
@@ -230,14 +230,15 @@ START_TEST(test_fo_resolve_service)
fail_if(fo_new_service(ctx->fo_ctx, "ntp", &service[2]) != EOK);
/* Add servers. */
- fail_if(fo_add_server(service[0], "localhost", 20, NULL) != EOK);
- fail_if(fo_add_server(service[0], "127.0.0.1", 80, NULL) != EOK);
+ fail_if(fo_add_server(service[0], "localhost", 20, NULL, true) != EOK);
+ fail_if(fo_add_server(service[0], "127.0.0.1", 80, NULL, false) != EOK);
- fail_if(fo_add_server(service[1], "localhost", 30, NULL) != EOK);
- fail_if(fo_add_server(service[1], "127.0.0.1", 389, NULL) != EOK);
- fail_if(fo_add_server(service[1], "127.0.0.1", 389, NULL) != EEXIST);
+ fail_if(fo_add_server(service[1], "localhost", 30, NULL, false) != EOK);
+ fail_if(fo_add_server(service[1], "127.0.0.1", 389, NULL, true) != EOK);
+ fail_if(fo_add_server(service[1], "127.0.0.1", 389, NULL, true) != EEXIST);
+ fail_if(fo_add_server(service[1], "127.0.0.1", 389, NULL, false) != EEXIST);
- fail_if(fo_add_server(service[2], NULL, 123, NULL) != EOK);
+ fail_if(fo_add_server(service[2], NULL, 123, NULL, true) != EOK);
/* Make requests. */
get_request(ctx, service[0], EOK, 20, PORT_WORKING, -1);