From 6f5d0383409b4e63bbc33392ef53543022a1cd68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 19 Aug 2025 14:42:41 +0200 Subject: [PATCH] adjust tests to new domain validator --- tests/e2e/Services/Health/HealthCustomServerTest.php | 2 +- tests/e2e/Services/Proxy/ProxyCustomServerTest.php | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/e2e/Services/Health/HealthCustomServerTest.php b/tests/e2e/Services/Health/HealthCustomServerTest.php index 4b7062dc22..04f4c63ca1 100644 --- a/tests/e2e/Services/Health/HealthCustomServerTest.php +++ b/tests/e2e/Services/Health/HealthCustomServerTest.php @@ -453,7 +453,7 @@ class HealthCustomServerTest extends Scope $this->assertIsInt($response['body']['validFrom']); $this->assertIsInt($response['body']['validTo']); - $response = $this->client->call(Client::METHOD_GET, '/health/certificate?domain=https://google.com', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/health/certificate?domain=google.com', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); diff --git a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php index ea310d5449..da23b9ab7c 100644 --- a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php +++ b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php @@ -109,15 +109,11 @@ class ProxyCustomServerTest extends Scope $rule = $this->createAPIRule('https://' . $domain); $this->assertEquals(400, $rule['headers']['status-code']); - // Unexpected I would say, but it is the current behaviour $rule = $this->createAPIRule('wss://' . $domain); - $this->assertEquals(201, $rule['headers']['status-code']); - $this->cleanupRule($rule['body']['$id']); + $this->assertEquals(400, $rule['headers']['status-code']); - // Unexpected I would say, but it is the current behaviour $rule = $this->createAPIRule($domain . '/some-path'); - $this->assertEquals(201, $rule['headers']['status-code']); - $this->cleanupRule($rule['body']['$id']); + $this->assertEquals(400, $rule['headers']['status-code']); } public function testCreateRedirectRule(): void