1
0
Fork 0
mirror of synced 2024-09-20 03:17:30 +12:00

Merge branch '1.6.x' of github.com:appwrite/appwrite into update-sdks-1.6

This commit is contained in:
Christy Jacob 2024-08-21 14:53:34 +04:00
commit 88b0ab9184
4 changed files with 39 additions and 5 deletions

View file

@ -3072,8 +3072,8 @@ $projectCollections = array_merge([
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
'required' => false,
'default' => [],
'array' => true,
'filters' => [],
],
@ -4795,8 +4795,8 @@ $consoleCollections = array_merge([
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => [],
'required' => true,
'default' => null,
'array' => true,
'filters' => [],
],

View file

@ -148,6 +148,7 @@ class V21 extends Migration
} catch (\Throwable $th) {
Console::warning("'scheduleId' from {$id}: {$th->getMessage()}");
}
break;
}
usleep(50000);
@ -194,7 +195,7 @@ class V21 extends Migration
$bucketId = 'bucket_' . $bucket['$internalId'];
try {
$this->projectDB->updateAttribute($bucketId, 'metadata', size: 75000);
$this->projectDB->updateAttribute($bucketId, 'metadata', size: 65534);
$this->projectDB->purgeCachedCollection($bucketId);
} catch (\Throwable $th) {
Console::warning("'bucketId' from {$bucketId}: {$th->getMessage()}");

View file

@ -16,6 +16,7 @@ class V18 extends Filter
Response::MODEL_FUNCTION => $this->parseFunction($content),
Response::MODEL_EXECUTION => $this->parseExecution($content),
Response::MODEL_PROJECT => $this->parseProject($content),
Response::MODEL_RUNTIME => $this->parseRuntime($content),
default => $parsedResponse,
};
@ -37,6 +38,7 @@ class V18 extends Filter
protected function parseFunction(array $content)
{
unset($content['scopes']);
unset($content['specification']);
return $content;
}
@ -46,4 +48,10 @@ class V18 extends Filter
unset($content['authSessionAlerts']);
return $content;
}
protected function parseRuntime(array $content)
{
unset($content['key']);
return $content;
}
}

View file

@ -147,4 +147,29 @@ class V18Test extends TestCase
$this->assertEquals($expected, $result);
}
public function runtimeProvider(): array
{
return [
'remove key' => [
[
'key' => 'example_key',
],
[
]
]
];
}
/**
* @dataProvider runtimeProvider
*/
public function testRuntime(array $content, array $expected): void
{
$model = Response::MODEL_RUNTIME;
$result = $this->filter->parse($content, $model);
$this->assertEquals($expected, $result);
}
}