Reproduce steps

This commit is contained in:
fogelito
2023-10-30 17:04:22 +02:00
parent 3caa49a547
commit ef3adf469e
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
stopOnFailure="true"
>
<extensions>
<extension class="Appwrite\Tests\TestHook" />
@@ -1945,6 +1945,22 @@ trait DatabasesBase
$this->assertEquals(200, $document['headers']['status-code']);
// Delete for the first time
$document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $id, array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
for ($i = 0 ; $i < 10000 ; $i++){
$document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $id, array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
$this->assertEquals('Document with the requested ID could not be found.', $document['body']['message']);
$this->assertEquals(404, $document['body']['code']);
}
$document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $id, array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],