Merge branch '1.9.x' of https://github.com/appwrite/appwrite into joins3

This commit is contained in:
fogelito
2026-03-23 17:28:40 +02:00
34 changed files with 1939 additions and 272 deletions
@@ -4633,6 +4633,7 @@ class ProjectsConsoleClientTest extends Scope
'x-appwrite-project' => $data['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()), [
'variableId' => 'unique()',
'key' => 'APP_TEST_CREATE',
'value' => 'TESTINGVALUE',
'secret' => false
@@ -4649,6 +4650,7 @@ class ProjectsConsoleClientTest extends Scope
'x-appwrite-project' => $data['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()), [
'variableId' => 'unique()',
'key' => 'APP_TEST_CREATE_1',
'value' => 'TESTINGVALUE_1',
'secret' => true
@@ -4667,6 +4669,7 @@ class ProjectsConsoleClientTest extends Scope
'x-appwrite-project' => $data['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()), [
'variableId' => 'unique()',
'key' => 'APP_TEST_CREATE',
'value' => 'ANOTHERTESTINGVALUE'
]);
@@ -4679,6 +4682,7 @@ class ProjectsConsoleClientTest extends Scope
'x-appwrite-project' => $data['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()), [
'variableId' => 'unique()',
'key' => str_repeat("A", 256),
'value' => 'TESTINGVALUE'
]);
@@ -4691,6 +4695,7 @@ class ProjectsConsoleClientTest extends Scope
'x-appwrite-project' => $data['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()), [
'variableId' => 'unique()',
'key' => 'LONGKEY',
'value' => str_repeat("#", 8193),
]);
@@ -4836,18 +4841,6 @@ class ProjectsConsoleClientTest extends Scope
$this->assertContains("APP_TEST_UPDATE", $variableKeys);
$this->assertContains("APP_TEST_UPDATE_1", $variableKeys);
/**
* Test for FAILURE
*/
$response = $this->client->call(Client::METHOD_PUT, '/project/variables/' . $data['variableId'], array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $data['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()));
$this->assertEquals(400, $response['headers']['status-code']);
$response = $this->client->call(Client::METHOD_PUT, '/project/variables/' . $data['variableId'], array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $data['projectId'],
@@ -4856,6 +4849,19 @@ class ProjectsConsoleClientTest extends Scope
'value' => 'TESTINGVALUEUPDATED_2'
]);
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertSame('TESTINGVALUEUPDATED_2', $response['body']['value']);
$this->assertSame('APP_TEST_UPDATE', $response['body']['key']);
/**
* Test for FAILURE
*/
$response = $this->client->call(Client::METHOD_PUT, '/project/variables/' . $data['variableId'], array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $data['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()));
$this->assertEquals(400, $response['headers']['status-code']);
$longKey = str_repeat("A", 256);
@@ -4905,6 +4911,7 @@ class ProjectsConsoleClientTest extends Scope
'x-appwrite-project' => $projectData['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()), [
'variableId' => 'unique()',
'key' => 'APP_TEST_DELETE',
'value' => 'TESTINGVALUE',
'secret' => false
@@ -4919,6 +4926,7 @@ class ProjectsConsoleClientTest extends Scope
'x-appwrite-project' => $projectData['projectId'],
'x-appwrite-mode' => 'admin',
], $this->getHeaders()), [
'variableId' => 'unique()',
'key' => 'APP_TEST_DELETE_1',
'value' => 'TESTINGVALUE_1',
'secret' => true