Close cleanup; only try to run power actions against non-suspended & installed servers; closes #2760

This commit is contained in:
Dane Everitt 2020-11-29 12:50:22 -08:00
parent 26d409c29c
commit 16f49f8dc1
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 40 additions and 107 deletions

View file

@ -53,7 +53,7 @@ class BulkPowerActionCommandTest extends CommandTestCase
$this->repository->expects('getServersForPowerAction')->with([], [])->andReturn($servers);
for ($i = 0; $i < count($servers); $i++) {
$this->powerRepository->expects('setNode->setServer->send')->with('kill')->andReturnNull();
$this->powerRepository->expects('setServer->send')->with('kill')->andReturnNull();
}
$display = $this->runCommand($this->getCommand(), ['action' => 'kill'], ['yes']);
@ -107,7 +107,7 @@ class BulkPowerActionCommandTest extends CommandTestCase
->andReturn(1);
$this->repository->expects('getServersForPowerAction')->with([], [])->andReturn(Collection::make([$server]));
$this->powerRepository->expects('setNode->setServer->send')->with('kill')->andReturnNull();
$this->powerRepository->expects('setServer->send')->with('kill')->andReturnNull();
$display = $this->runCommand($this->getCommand(), [
'action' => 'kill',