1
0
Fork 0
mirror of synced 2024-08-22 21:52:17 +12:00

feat: Delete execution

This commit is contained in:
Binyamin Yawitz 2024-06-27 11:39:27 -04:00
parent 366d75fe39
commit 9172ff6b14
No known key found for this signature in database

View file

@ -1035,25 +1035,6 @@ class FunctionsCustomServerTest extends Scope
/**
* Test for FAILURE
*/
$execution = $this->client->call(Client::METHOD_POST, '/functions/' . $data['functionId'] . '/executions', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'async' => true,
]);
$executionId = $execution['body']['$id'] ?? '';
$this->assertEquals(202, $execution['headers']['status-code']);
$execution = $this->client->call(Client::METHOD_DELETE, '/functions/' . $data['functionId'] . '/executions/' . $executionId, array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
$this->assertEquals(400, $execution['headers']['status-code']);
$this->assertStringContainsString('execution_in_progress', $execution['body']['type']);
$this->assertStringContainsString('Can\'t delete ongoing execution.', $execution['body']['message']);
return $data;
}