1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Fix tests

This commit is contained in:
kodumbeats 2021-08-08 19:51:18 -04:00
parent ae95d1b83a
commit 83c4001f50
2 changed files with 7 additions and 5 deletions

View file

@ -43,16 +43,19 @@ trait DatabaseBase
'required' => true,
]);
sleep(2);
$releaseYear = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['moviesId'] . '/attributes/integer', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'attributeId' => 'releaseYear',
'size' => 0,
'required' => true,
]);
sleep(2);
$actors = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['moviesId'] . '/attributes/string', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@ -61,7 +64,6 @@ trait DatabaseBase
'attributeId' => 'actors',
'size' => 256,
'required' => false,
'default' => null,
'array' => true,
]);
@ -88,7 +90,7 @@ trait DatabaseBase
$this->assertEquals($actors['body']['array'], true);
// wait for database worker to create attributes
sleep(10);
sleep(5);
$movies = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'], array_merge([
'content-type' => 'application/json',
@ -120,7 +122,7 @@ trait DatabaseBase
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'id' => 'titleIndex',
'indexId' => 'titleIndex',
'type' => 'fulltext',
'attributes' => ['title'],
]);

View file

@ -63,7 +63,7 @@ class WebhooksCustomServerTest extends Scope
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'id' => 'fullname',
'indexId' => 'fullname',
'type' => 'key',
'attributes' => ['lastName', 'firstName'],
'orders' => ['ASC', 'ASC'],