CLI-822: Add --task-wait option to API commands #2578
Annotations
1 error and 2 warnings
Run Infection for added files only
Process completed with exit code 1.
|
Run Infection for added files only:
src/Command/Api/ApiBaseCommand.php#L138
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
}
$notificationUuid = CommandBase::getNotificationUuidFromResponse($response);
$success = $this->waitForNotificationToComplete($this->cloudApiClientService->getClient(), $notificationUuid, "Waiting for task {$notificationUuid} to complete");
- return $success ? Command::SUCCESS : Command::FAILURE;
+ return $success ? Command::FAILURE : Command::SUCCESS;
}
public function setMethod(string $method) : void
{
|
Run Infection for added files only:
src/Command/Api/ApiCommandHelper.php#L104
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
$inputDefinition = array_merge($inputDefinition, $bodyInputDefinition);
}
// Add --task-wait parameter for responses with notifications.
- if (array_key_exists('responses', $schema) && array_key_exists(202, $schema['responses'])) {
+ if (array_key_exists('responses', $schema) || array_key_exists(202, $schema['responses'])) {
$inputDefinition[] = new InputOption('task-wait', null, InputOption::VALUE_NONE, 'Wait for this task to complete');
}
$command->setDefinition(new InputDefinition($inputDefinition));
|
Loading