[Nostromo] Improve test coverage

This commit is contained in:
Andrés Montañez
2017-01-07 02:04:36 -03:00
parent 238777cb41
commit 6d708c35fa
11 changed files with 73 additions and 9 deletions
@@ -94,7 +94,6 @@ class DeployCommand extends AbstractCommand
$this->taskFactory = new TaskFactory($this->runtime);
$this->runDeployment($output);
} catch (RuntimeException $exception) {
$output->writeln('');
$output->writeln(sprintf('<error>%s</error>', $exception->getMessage()));
@@ -287,12 +286,10 @@ class DeployCommand extends AbstractCommand
$this->statusCode = 180;
$this->log(sprintf('Task %s (%s) finished with FAIL', $task->getDescription(), $task->getName()));
}
} catch (SkipException $exception) {
$succeededTasks++;
$output->writeln('<fg=yellow>SKIPPED</>');
$this->log(sprintf('Task %s (%s) finished with SKIPPED, thrown SkipException', $task->getDescription(), $task->getName()));
} catch (ErrorException $exception) {
$output->writeln(sprintf('<fg=red>ERROR</> [%s]', $exception->getTrimmedMessage()));
$this->log(sprintf('Task %s (%s) finished with FAIL, with Error "%s"', $task->getDescription(), $task->getName(), $exception->getMessage()));
@@ -134,7 +134,6 @@ class ListCommand extends AbstractCommand
$output->writeln('');
}
}
} catch (RuntimeException $exception) {
$output->writeln(sprintf('<error>%s</error>', $exception->getMessage()));
$this->statusCode = $exception->getCode();
@@ -83,7 +83,6 @@ class RollbackCommand extends DeployCommand
$this->taskFactory = new TaskFactory($this->runtime);
$this->runDeployment($output);
} catch (RuntimeException $exception) {
$output->writeln(sprintf('<error>%s</error>', $exception->getMessage()));
$this->statusCode = $exception->getCode();