diff options
author | georglauterbach <44545919+georglauterbach@users.noreply.github.com> | 2024-10-13 08:21:03 +0000 |
---|---|---|
committer | georglauterbach <44545919+georglauterbach@users.noreply.github.com> | 2024-11-06 20:21:38 +0100 |
commit | 387cd8b771d5baefdc8a3ffb22ee00458310b3dd (patch) | |
tree | bcbe674a905fc261674aaf49d41519f6dc62041b /tests | |
parent | de30fadaf5da7eea098d7cae1b0aed9836b3246a (diff) | |
download | nextcloud-server-387cd8b771d5baefdc8a3ffb22ee00458310b3dd.tar.gz nextcloud-server-387cd8b771d5baefdc8a3ffb22ee00458310b3dd.zip |
fix: do not query CNAME if A succeeded already
Signed-off-by: georglauterbach <44545919+georglauterbach@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Http/Client/DnsPinMiddlewareTest.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/Http/Client/DnsPinMiddlewareTest.php b/tests/lib/Http/Client/DnsPinMiddlewareTest.php index 9d71af15c5d..88059d44121 100644 --- a/tests/lib/Http/Client/DnsPinMiddlewareTest.php +++ b/tests/lib/Http/Client/DnsPinMiddlewareTest.php @@ -537,10 +537,11 @@ class DnsPinMiddlewareTest extends TestCase { ['nextcloud' => ['allow_local_address' => false]] ); - $this->assertCount(4, $dnsQueries); + $this->assertCount(3, $dnsQueries); $this->assertContains('example.com' . DNS_SOA, $dnsQueries); $this->assertContains('subsubdomain.subdomain.example.com' . DNS_A, $dnsQueries); $this->assertContains('subsubdomain.subdomain.example.com' . DNS_AAAA, $dnsQueries); - $this->assertContains('subsubdomain.subdomain.example.com' . DNS_CNAME, $dnsQueries); + // CNAME should not be queried if A or AAAA succeeded already + $this->assertNotContains('subsubdomain.subdomain.example.com' . DNS_CNAME, $dnsQueries); } } |