aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorgeorglauterbach <44545919+georglauterbach@users.noreply.github.com>2024-10-13 08:21:03 +0000
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-11-14 10:46:13 +0000
commit487d19a0b35b07a3ca2c0c5a53a44eb09ee21cb4 (patch)
tree5168acb1a5525fe93fc1fb7d847b9347fd4ff39a /tests
parentaaf43b9a054e57d8bb12eb3d87141f07ac3b069b (diff)
downloadnextcloud-server-487d19a0b35b07a3ca2c0c5a53a44eb09ee21cb4.tar.gz
nextcloud-server-487d19a0b35b07a3ca2c0c5a53a44eb09ee21cb4.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.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/Http/Client/DnsPinMiddlewareTest.php b/tests/lib/Http/Client/DnsPinMiddlewareTest.php
index 54071f37b1a..65763027408 100644
--- a/tests/lib/Http/Client/DnsPinMiddlewareTest.php
+++ b/tests/lib/Http/Client/DnsPinMiddlewareTest.php
@@ -554,10 +554,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);
}
}