From f3ea3ced53ac7662e7accc63386980588832bf25 Mon Sep 17 00:00:00 2001 From: Swikriti Tripathi Date: Tue, 23 Aug 2022 14:33:54 +0545 Subject: [PATCH] remove logic to store personal spaces of created users only --- tests/acceptance/features/bootstrap/SpacesContext.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index bb6c77799b5..29f9aa52923 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -409,7 +409,6 @@ public function setUpScenario(BeforeScenarioScope $scope): void { $this->baseUrl, $this->featureContext->getOcPath() ); - $this->availableSpaces = []; } /** @@ -457,7 +456,7 @@ public function deleteAllProjectSpaces(): void { } $this->sendDeleteSpaceRequest($userName, $value["name"]); } - } + } } } } @@ -539,6 +538,7 @@ public function listAllSpacesRequest( array $headers = [] ): ResponseInterface { $fullUrl = $this->baseUrl . "/graph/v1.0/drives/" . $urlArguments; + return HttpRequestHelper::get($fullUrl, $xRequestId, $user, $password, $headers, $body); } @@ -899,7 +899,6 @@ public function theAdministratorGivesUserTheRole(string $user, string $role): vo * @throws Exception */ public function rememberTheAvailableSpaces(): void { - $this->availableSpaces = []; $rawBody = $this->featureContext->getResponse()->getBody()->getContents(); $drives = json_decode($rawBody, true, 512, JSON_THROW_ON_ERROR); if (isset($drives["value"])) { @@ -1642,6 +1641,7 @@ public function updateSpaceQuota( ): void { $space = $this->getSpaceByName($user, $spaceName); $spaceId = $space["id"]; + $bodyData = ["quota" => ["total" => $newQuota]]; $body = json_encode($bodyData, JSON_THROW_ON_ERROR); @@ -1769,6 +1769,7 @@ public function sendUpdateSpaceRequest( ): ResponseInterface { $fullUrl = $this->baseUrl . "/graph/v1.0/drives/$spaceId"; $method = 'PATCH'; + return HttpRequestHelper::sendRequest($fullUrl, $xRequestId, $method, $user, $password, $headers, $body); }