Skip to content

CLI-1330: TypeError for SSH commands on Node environments #2280

CLI-1330: TypeError for SSH commands on Node environments

CLI-1330: TypeError for SSH commands on Node environments #2280

Triggered via pull request April 26, 2024 20:03
Status Failure
Total duration 9m 43s
Artifacts

mutation.yml

on: pull_request
Mutation Testing
9m 33s
Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

1 error and 9 warnings
Mutation Testing
Process completed with exit code 1.
Mutation Testing: src/Command/CommandBase.php#L1688
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ protected function getAnyNonProdAhEnvironment(string $cloudAppUuid) : EnvironmentResponse|false { return $this->getAnyAhEnvironment($cloudAppUuid, function (EnvironmentResponse $environment) { - return !$environment->flags->production && $environment->type === 'drupal'; + return !$environment->flags->production || $environment->type === 'drupal'; }); } /**
Mutation Testing: src/Command/Pull/PullDatabaseCommand.php#L43
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ // $noImport implies $noScripts. $noScripts = $noImport || $noScripts; $this->setDirAndRequireProjectCwd($input); - $sourceEnvironment = $this->determineEnvironment($input, $output, TRUE, FALSE); + $sourceEnvironment = $this->determineEnvironment($input, $output, TRUE, true); $this->pullDatabase($input, $output, $sourceEnvironment, $onDemand, $noImport, $multipleDbs); if (!$noScripts) { $this->runDrushCacheClear($this->getOutputCallback($output, $this->checklist), $this->checklist);
Mutation Testing: src/Command/Pull/PullFilesCommand.php#L25
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ protected function execute(InputInterface $input, OutputInterface $output) : int { $this->setDirAndRequireProjectCwd($input); - $sourceEnvironment = $this->determineEnvironment($input, $output, TRUE, FALSE); + $sourceEnvironment = $this->determineEnvironment($input, $output, false, FALSE); $this->pullFiles($input, $output, $sourceEnvironment); return Command::SUCCESS; } }
Mutation Testing: src/Command/Pull/PullFilesCommand.php#L25
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ protected function execute(InputInterface $input, OutputInterface $output) : int { $this->setDirAndRequireProjectCwd($input); - $sourceEnvironment = $this->determineEnvironment($input, $output, TRUE, FALSE); + $sourceEnvironment = $this->determineEnvironment($input, $output, TRUE, true); $this->pullFiles($input, $output, $sourceEnvironment); return Command::SUCCESS; } }
Mutation Testing: src/Command/Push/PushDatabaseCommand.php#L30
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ } protected function execute(InputInterface $input, OutputInterface $output) : int { - $destinationEnvironment = $this->determineEnvironment($input, $output, FALSE, FALSE); + $destinationEnvironment = $this->determineEnvironment($input, $output, true, FALSE); $acquiaCloudClient = $this->cloudApiClientService->getClient(); $databases = $this->determineCloudDatabases($acquiaCloudClient, $destinationEnvironment, $input->getArgument('site')); // We only support pushing a single database.
Mutation Testing: src/Command/Push/PushDatabaseCommand.php#L30
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ } protected function execute(InputInterface $input, OutputInterface $output) : int { - $destinationEnvironment = $this->determineEnvironment($input, $output, FALSE, FALSE); + $destinationEnvironment = $this->determineEnvironment($input, $output, FALSE, true); $acquiaCloudClient = $this->cloudApiClientService->getClient(); $databases = $this->determineCloudDatabases($acquiaCloudClient, $destinationEnvironment, $input->getArgument('site')); // We only support pushing a single database.
Mutation Testing: src/Command/Push/PushDatabaseCommand.php#L86
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ { $this->logger->debug("Importing {$remoteDumpFilepath} to MySQL on remote machine"); $command = "pv {$remoteDumpFilepath} --bytes --rate | gunzip | MYSQL_PWD={$database->password} mysql --host={$this->getHostFromDatabaseResponse($environment, $database)} --user={$database->user_name} {$this->getNameFromDatabaseResponse($database)}"; - $process = $this->sshHelper->executeCommand($environment->sshUrl, [$command], $this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL); + $process = $this->sshHelper->executeCommand($environment->sshUrl, [$command], $this->output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL); if (!$process->isSuccessful()) { throw new AcquiaCliException('Unable to import database on remote machine. {message}', ['message' => $process->getErrorOutput()]); }
Mutation Testing: src/Command/Push/PushFilesCommand.php#L27
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ protected function execute(InputInterface $input, OutputInterface $output) : int { $this->setDirAndRequireProjectCwd($input); - $destinationEnvironment = $this->determineEnvironment($input, $output, FALSE, FALSE); + $destinationEnvironment = $this->determineEnvironment($input, $output, true, FALSE); $chosenSite = $input->getArgument('site'); if (!$chosenSite) { $chosenSite = $this->promptChooseDrupalSite($destinationEnvironment);
Mutation Testing: src/Command/Push/PushFilesCommand.php#L27
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ protected function execute(InputInterface $input, OutputInterface $output) : int { $this->setDirAndRequireProjectCwd($input); - $destinationEnvironment = $this->determineEnvironment($input, $output, FALSE, FALSE); + $destinationEnvironment = $this->determineEnvironment($input, $output, FALSE, true); $chosenSite = $input->getArgument('site'); if (!$chosenSite) { $chosenSite = $this->promptChooseDrupalSite($destinationEnvironment);