Commit ccb1250f authored by Luca Boccassi's avatar Luca Boccassi

Problem: a curve test uses hard-coded TCP port

Solution: use the wildcard endpoint instead
parent c191909c
...@@ -423,7 +423,8 @@ void test_curve_security_with_null_client_credentials (void *ctx, ...@@ -423,7 +423,8 @@ void test_curve_security_with_null_client_credentials (void *ctx,
#endif #endif
} }
void test_curve_security_with_plain_client_credentials (void *ctx, void *server) void test_curve_security_with_plain_client_credentials (void *ctx, void *server,
char *my_endpoint)
{ {
// This must be caught by the curve_server class, not passed to ZAP // This must be caught by the curve_server class, not passed to ZAP
void *client = zmq_socket (ctx, ZMQ_DEALER); void *client = zmq_socket (ctx, ZMQ_DEALER);
...@@ -432,7 +433,7 @@ void test_curve_security_with_plain_client_credentials (void *ctx, void *server) ...@@ -432,7 +433,7 @@ void test_curve_security_with_plain_client_credentials (void *ctx, void *server)
assert (rc == 0); assert (rc == 0);
rc = zmq_setsockopt (client, ZMQ_PLAIN_PASSWORD, "password", 8); rc = zmq_setsockopt (client, ZMQ_PLAIN_PASSWORD, "password", 8);
assert (rc == 0); assert (rc == 0);
rc = zmq_connect (client, "tcp://localhost:9998"); rc = zmq_connect (client, my_endpoint);
assert (rc == 0); assert (rc == 0);
expect_bounce_fail (server, client); expect_bounce_fail (server, client);
close_zero_linger (client); close_zero_linger (client);
...@@ -566,7 +567,7 @@ int main (void) ...@@ -566,7 +567,7 @@ int main (void)
setup_context_and_server_side (&ctx, &handler, &zap_thread, &server, setup_context_and_server_side (&ctx, &handler, &zap_thread, &server,
&server_mon, my_endpoint); &server_mon, my_endpoint);
test_curve_security_with_plain_client_credentials (ctx, server); test_curve_security_with_plain_client_credentials (ctx, server, my_endpoint);
shutdown_context_and_server_side (ctx, zap_thread, server, server_mon); shutdown_context_and_server_side (ctx, zap_thread, server, server_mon);
setup_context_and_server_side (&ctx, &handler, &zap_thread, &server, setup_context_and_server_side (&ctx, &handler, &zap_thread, &server,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment