|
@@ -457,10 +457,12 @@ test_mg_start_stop_http_server_impl(int ipv6, int bound)
|
|
|
ck_assert_int_eq(portinfo[0].port, 0);
|
|
|
ck_assert_int_eq(portinfo[0].is_ssl, 0);
|
|
|
ck_assert_int_eq(portinfo[0].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(portinfo[0].is_optional, 0);
|
|
|
ck_assert_int_eq(portinfo[1].protocol, 0);
|
|
|
ck_assert_int_eq(portinfo[1].port, 0);
|
|
|
ck_assert_int_eq(portinfo[1].is_ssl, 0);
|
|
|
ck_assert_int_eq(portinfo[1].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(portinfo[1].is_optional, 0);
|
|
|
|
|
|
ret = mg_get_server_ports(ctx, 4, portinfo);
|
|
|
ck_assert_int_eq(ret, 1);
|
|
@@ -472,10 +474,12 @@ test_mg_start_stop_http_server_impl(int ipv6, int bound)
|
|
|
ck_assert_int_eq(portinfo[0].port, 8080);
|
|
|
ck_assert_int_eq(portinfo[0].is_ssl, 0);
|
|
|
ck_assert_int_eq(portinfo[0].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(portinfo[0].is_optional, 0);
|
|
|
ck_assert_int_eq(portinfo[1].protocol, 0);
|
|
|
ck_assert_int_eq(portinfo[1].port, 0);
|
|
|
ck_assert_int_eq(portinfo[1].is_ssl, 0);
|
|
|
ck_assert_int_eq(portinfo[1].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(portinfo[1].is_optional, 0);
|
|
|
|
|
|
test_sleep(1);
|
|
|
|
|
@@ -649,7 +653,7 @@ START_TEST(test_mg_start_stop_https_server)
|
|
|
OPTIONS[opt_idx++] = ".";
|
|
|
#endif
|
|
|
OPTIONS[opt_idx++] = "listening_ports";
|
|
|
- OPTIONS[opt_idx++] = "8080r,8443s";
|
|
|
+ OPTIONS[opt_idx++] = "8080r,8443os";
|
|
|
OPTIONS[opt_idx++] = "ssl_certificate";
|
|
|
OPTIONS[opt_idx++] = ssl_cert;
|
|
|
|
|
@@ -674,10 +678,12 @@ START_TEST(test_mg_start_stop_https_server)
|
|
|
ck_assert_int_eq(portinfo[0].port, 0);
|
|
|
ck_assert_int_eq(portinfo[0].is_ssl, 0);
|
|
|
ck_assert_int_eq(portinfo[0].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(portinfo[0].is_optional, 0);
|
|
|
ck_assert_int_eq(portinfo[1].protocol, 0);
|
|
|
ck_assert_int_eq(portinfo[1].port, 0);
|
|
|
ck_assert_int_eq(portinfo[1].is_ssl, 0);
|
|
|
ck_assert_int_eq(portinfo[1].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(portinfo[1].is_optional, 0);
|
|
|
|
|
|
ret = mg_get_server_ports(ctx, 4, portinfo);
|
|
|
ck_assert_int_eq(ret, 2);
|
|
@@ -685,14 +691,17 @@ START_TEST(test_mg_start_stop_https_server)
|
|
|
ck_assert_int_eq(portinfo[0].port, 8080);
|
|
|
ck_assert_int_eq(portinfo[0].is_ssl, 0);
|
|
|
ck_assert_int_eq(portinfo[0].is_redirect, 1);
|
|
|
+ ck_assert_int_eq(portinfo[0].is_optional, 0);
|
|
|
ck_assert_int_eq(portinfo[1].protocol, 1);
|
|
|
ck_assert_int_eq(portinfo[1].port, 8443);
|
|
|
ck_assert_int_eq(portinfo[1].is_ssl, 1);
|
|
|
ck_assert_int_eq(portinfo[1].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(portinfo[1].is_optional, 1);
|
|
|
ck_assert_int_eq(portinfo[2].protocol, 0);
|
|
|
ck_assert_int_eq(portinfo[2].port, 0);
|
|
|
ck_assert_int_eq(portinfo[2].is_ssl, 0);
|
|
|
ck_assert_int_eq(portinfo[2].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(portinfo[2].is_optional, 0);
|
|
|
|
|
|
test_sleep(1);
|
|
|
|
|
@@ -771,7 +780,7 @@ START_TEST(test_mg_server_and_client_tls)
|
|
|
OPTIONS[opt_idx++] = ".";
|
|
|
#endif
|
|
|
OPTIONS[opt_idx++] = "listening_ports";
|
|
|
- OPTIONS[opt_idx++] = "8080r,8443s";
|
|
|
+ OPTIONS[opt_idx++] = "8080r,8443os";
|
|
|
OPTIONS[opt_idx++] = "ssl_certificate";
|
|
|
OPTIONS[opt_idx++] = server_cert;
|
|
|
OPTIONS[opt_idx++] = "ssl_verify_peer";
|
|
@@ -800,14 +809,17 @@ START_TEST(test_mg_server_and_client_tls)
|
|
|
ck_assert_int_eq(ports[0].port, 8080);
|
|
|
ck_assert_int_eq(ports[0].is_ssl, 0);
|
|
|
ck_assert_int_eq(ports[0].is_redirect, 1);
|
|
|
+ ck_assert_int_eq(ports[0].is_optional, 0);
|
|
|
ck_assert_int_eq(ports[1].protocol, 1);
|
|
|
ck_assert_int_eq(ports[1].port, 8443);
|
|
|
ck_assert_int_eq(ports[1].is_ssl, 1);
|
|
|
ck_assert_int_eq(ports[1].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(ports[1].is_optional, 1);
|
|
|
ck_assert_int_eq(ports[2].protocol, 0);
|
|
|
ck_assert_int_eq(ports[2].port, 0);
|
|
|
ck_assert_int_eq(ports[2].is_ssl, 0);
|
|
|
ck_assert_int_eq(ports[2].is_redirect, 0);
|
|
|
+ ck_assert_int_eq(ports[2].is_optional, 0);
|
|
|
|
|
|
test_sleep(1);
|
|
|
|