[Discovery One] Improve tests

This commit is contained in:
Andrés Montañez 2018-03-31 04:34:54 -03:00
parent 83110941eb
commit 3dc7acf3d4
3 changed files with 5 additions and 1 deletions

View file

@ -38,7 +38,7 @@ class CachePoolClearTask extends AbstractSymfonyTask
throw new ErrorException('Parameter "pools" is not defined'); throw new ErrorException('Parameter "pools" is not defined');
} }
$command = $options['console'] . ' cache:pool:clear --env=' . $options['env'] . ' ' . $options['flags'] . ' ' . $options['pools']; $command = $options['console'] . ' cache:pool:clear ' . $options['pools'] . ' --env=' . $options['env'] . ' ' . $options['flags'];
/** @var Process $process */ /** @var Process $process */
$process = $this->runtime->runCommand(trim($command)); $process = $this->runtime->runCommand(trim($command));

View file

@ -37,6 +37,8 @@ class DeployCommandMiscTasksTest extends TestCase
2 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost "cd /var/www/test && bin/console assets:install web --env=testenv --symlink --relative"', 2 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost "cd /var/www/test && bin/console assets:install web --env=testenv --symlink --relative"',
3 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost "cd /var/www/test && bin/console cache:pool:prune --env=testenv"', 3 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost "cd /var/www/test && bin/console cache:pool:prune --env=testenv"',
4 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost "cd /var/www/test && bin/console cache:pool:prune --env=prod"', 4 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost "cd /var/www/test && bin/console cache:pool:prune --env=prod"',
5 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost "cd /var/www/test && bin/console cache:pool:clear main --env=testenv"',
6 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost "cd /var/www/test && bin/console cache:pool:clear main --env=prod"',
); );
// Check total of Executed Commands // Check total of Executed Commands

View file

@ -16,3 +16,5 @@ magephp:
- symfony/assets-install - symfony/assets-install
- symfony/cache-pool-prune - symfony/cache-pool-prune
- symfony/cache-pool-prune: { env: 'prod' } - symfony/cache-pool-prune: { env: 'prod' }
- symfony/cache-pool-clear: { pools: 'main' }
- symfony/cache-pool-clear: { env: 'prod', pools: 'main' }