Browse Source

Split tests between HTTP and HTTPS, so it is clear which one failed

bel 10 years ago
parent
commit
ce422e16d9
2 changed files with 10 additions and 6 deletions
  1. 2 1
      test/CMakeLists.txt
  2. 8 5
      test/public.c

+ 2 - 1
test/CMakeLists.txt

@@ -94,7 +94,8 @@ endmacro(civetweb_add_test)
 
 # Public API tests
 civetweb_add_test(Public "Cookies")
-civetweb_add_test(Public "Start Stop Server")
+civetweb_add_test(Public "Start Stop HTTP Server")
+civetweb_add_test(Public "Start Stop HTTPS Server")
 
 # Private API tests
 civetweb_add_test(Private "HTTP Message")

+ 8 - 5
test/public.c

@@ -78,7 +78,7 @@ START_TEST (test_mg_start_stop_https_server)
   struct mg_context *ctx;
   const char *OPTIONS[] = {
     "document_root", ".",
-    "listening_ports", "8080",
+    "listening_ports", "8080,8443s",
     "ssl_certificate", "../resources/ssl_cert.pem",
     NULL,
   };
@@ -95,14 +95,17 @@ Suite * make_public_suite (void) {
 
   Suite * const suite = suite_create("Public");
   TCase * const cookies = tcase_create("Cookies");
-  TCase * const startstop = tcase_create("Start Stop Server");
+  TCase * const startstophttp = tcase_create("Start Stop HTTP Server");
+  TCase * const startstophttps = tcase_create("Start Stop HTTPS Server");
 
   tcase_add_test(cookies, test_mg_get_cookie);
   suite_add_tcase(suite, cookies);
 
-  tcase_add_test(startstop, test_mg_start_stop_http_server);
-  tcase_add_test(startstop, test_mg_start_stop_https_server);
-  suite_add_tcase(suite, startstop);
+  tcase_add_test(startstophttp, test_mg_start_stop_http_server);
+  suite_add_tcase(suite, startstophttp);
+
+  tcase_add_test(startstophttps, test_mg_start_stop_https_server);
+  suite_add_tcase(suite, startstophttps);
 
   return suite;
 }