]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
unit-tests: Adhere to TESTS_NO_IPV6 in HTTP fetcher test suite
authorTobias Brunner <tobias@strongswan.org>
Thu, 28 Mar 2024 06:46:17 +0000 (07:46 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 2 Apr 2024 12:18:49 +0000 (14:18 +0200)
src/libstrongswan/tests/suites/test_fetch_http.c

index a2a0516f3b92485a00898d2233423b71c747abf6..b087a1e791ac4a4fd38f1fb5a14c209f9699bbd5 100644 (file)
@@ -309,16 +309,22 @@ Suite *fetch_http_suite_create()
 {
        Suite *s;
        TCase *tc;
+       int no_ipv6 = 0;
 
        s = suite_create("http fetcher");
 
+       if (getenv("TESTS_NO_IPV6"))
+       {
+               no_ipv6 = 1;
+       }
+
        tc = tcase_create("GET");
-       tcase_add_loop_test(tc, test_get, 0, countof(gtests));
+       tcase_add_loop_test(tc, test_get, 0, countof(gtests) - no_ipv6);
        test_case_set_timeout(tc, 10);
        suite_add_tcase(s, tc);
 
        tc = tcase_create("POST");
-       tcase_add_loop_test(tc, test_post, 0, countof(ptests));
+       tcase_add_loop_test(tc, test_post, 0, countof(ptests) - no_ipv6);
        test_case_set_timeout(tc, 10);
        suite_add_tcase(s, tc);