Merge branch 'feat-storage-buckets' into feat-large-file
This commit is contained in:
commit
00aae12d00
1 changed files with 13 additions and 2 deletions
|
@ -46,11 +46,22 @@ class StorageConsoleClientTest extends Scope
|
|||
|
||||
public function testGetStorageBucketUsage()
|
||||
{
|
||||
//create bucket
|
||||
$bucket = $this->client->call(Client::METHOD_POST, '/storage/buckets', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'bucketId' => 'unique()',
|
||||
'name' => 'Test Bucket',
|
||||
]);
|
||||
$this->assertEquals(201, $bucket['headers']['status-code']);
|
||||
$bucketId = $bucket['body']['$id'];
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
*/
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/storage/default/usage', array_merge([
|
||||
$response = $this->client->call(Client::METHOD_GET, '/storage/' . $bucketId . '/usage', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id']
|
||||
], $this->getHeaders()), [
|
||||
|
@ -73,7 +84,7 @@ class StorageConsoleClientTest extends Scope
|
|||
/**
|
||||
* Test for SUCCESS
|
||||
*/
|
||||
$response = $this->client->call(Client::METHOD_GET, '/storage/default/usage', array_merge([
|
||||
$response = $this->client->call(Client::METHOD_GET, '/storage/' . $bucketId . '/usage', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id']
|
||||
], $this->getHeaders()), [
|
||||
|
|
Loading…
Reference in a new issue