Skip to content

Commit

Permalink
delete checking -no spaces have been found
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor committed Aug 24, 2022
1 parent f9177fc commit b0519cb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/acceptance/features/bootstrap/SpacesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,13 @@ public function deleteAllProjectSpaces(): void {
$userName = $user["actualUsername"];
}
}

if (!\array_key_exists("deleted", $value["root"])) {
$this->sendDisableSpaceRequest($userName, $value["name"]);
// we do not delete spaces created by non-test users
if (isset($userName)) {
if (!\array_key_exists("deleted", $value["root"])) {
$this->sendDisableSpaceRequest($userName, $value["name"]);
}
$this->sendDeleteSpaceRequest($userName, $value["name"]);
}
$this->sendDeleteSpaceRequest($userName, $value["name"]);
}
}
}
Expand Down Expand Up @@ -907,13 +909,11 @@ public function rememberTheAvailableSpaces(): void {
$drives = $drives["value"];
}

Assert::assertArrayHasKey(0, $drives, "No drives were found on that endpoint");
$spaces = [];
foreach ($drives as $drive) {
$spaces[$drive["name"]] = $drive;
}
$this->setAvailableSpaces($spaces);
Assert::assertNotEmpty($spaces, "No spaces have been found");
}

/**
Expand Down

0 comments on commit b0519cb

Please sign in to comment.