[TASK] Skip IPv6 related dns resolution tests 06/59106/2
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:16:36 +0000 (12:16 +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/59106
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 4d96058..1235d48 100644 (file)
@@ -536,6 +536,9 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\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));
     }