Skip to content

Commit

Permalink
remove logic to store personal spaces of created users only
Browse files Browse the repository at this point in the history
  • Loading branch information
SwikritiT committed Aug 25, 2022
1 parent 71dafb3 commit f3ea3ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/acceptance/features/bootstrap/SpacesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ public function setUpScenario(BeforeScenarioScope $scope): void {
$this->baseUrl,
$this->featureContext->getOcPath()
);
$this->availableSpaces = [];
}

/**
Expand Down Expand Up @@ -457,7 +456,7 @@ public function deleteAllProjectSpaces(): void {
}
$this->sendDeleteSpaceRequest($userName, $value["name"]);
}
}
}
}
}
}
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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"])) {
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit f3ea3ce

Please sign in to comment.