[TASK] Skip IPv6 related dns resolution tests 81/59081/3
authorMarkus Klein <markus.klein@typo3.org>
Mon, 10 Dec 2018 19:04:08 +0000 (20:04 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 11 Dec 2018 11:22:45 +0000 (12:22 +0100)
Skip those tests on systems which do not properly resolve ::1 to localhost.
Travis CI is one example.

Resolves: #87119
Releases: 8.7, 7.6
Change-Id: I8d96f8da1c19f3d9924dcc048466b5f88d8f18dd
Reviewed-on: https://review.typo3.org/59081
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php

index 703719d..92db382 100644 (file)
@@ -571,6 +571,9 @@ class GeneralUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
      */
     public function cmpFqdnReturnsTrue($baseHost, $list)
     {
+        if ($baseHost === '::1' && !gethostbyaddr($baseHost)) {
+            $this->markTestSkipped('Skip test for IPv6 resolution where this is not properly working on the system. Like Travis CI.');
+        }
         $this->assertTrue(GeneralUtility::cmpFQDN($baseHost, $list));
     }