adjust tests to new domain validator

This commit is contained in:
Matej Bačo
2025-08-19 14:42:41 +02:00
parent 79375ad5b5
commit 6f5d038340
2 changed files with 3 additions and 7 deletions
@@ -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()), []);
@@ -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