feat: Delete execution
This commit is contained in:
parent
366d75fe39
commit
9172ff6b14
1 changed files with 0 additions and 19 deletions
|
@ -1035,25 +1035,6 @@ class FunctionsCustomServerTest extends Scope
|
||||||
/**
|
/**
|
||||||
* Test for FAILURE
|
* 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;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue