Fix tests
This commit is contained in:
parent
ae95d1b83a
commit
83c4001f50
|
@ -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'],
|
||||
]);
|
||||
|
|
|
@ -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'],
|
||||
|
|
Loading…
Reference in a new issue