Skip to content

Commit

Permalink
OPENEUROPA-1739: Add simulating test.
Browse files Browse the repository at this point in the history
  • Loading branch information
D Vargas committed Aug 27, 2019
1 parent b275815 commit 2186813
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ The Task Runner comes with the following built-in commands:
| `drupal:site-install` | Install a target Drupal site using default configuration values and/or CLI options |
| `drupal:site-pre-install` | Run Drupal pre-install commands as listed under the `drupal.pre_install` property |
| `drupal:site-post-install` | Run Drupal post-install commands as listed under the `drupal.post_install` property |
| `drupal:services-setup` | Create services file in site directory by copying given file (as parameter or in `drupal.service_parameters`) |
| `drupal:settings-setup` | Setup default Drupal settings file by appending values specified at `drupal.settings` |
| `drupal:drush-setup` | Setup Drush 8 and 9 configuration files |
| `release:create-archive` | Create and archive a release for the current project |
Expand Down
8 changes: 1 addition & 7 deletions src/Commands/AbstractDrupalCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ public function drushSetup(array $options = [
* @option service-parameters Drupal services filename.
* @option root Drupal root.
* @option sites-subdir Drupal site subdirectory.
* @option force Drupal force generation of a new settings.php.
* @option skip-permissions-setup Drupal skip permissions setup.
* @option force Drupal force generation of a new services.yml.
*
* @param array $options
*
Expand All @@ -341,7 +340,6 @@ public function servicesSetup(array $options = [
'root' => InputOption::VALUE_REQUIRED,
'sites-subdir' => InputOption::VALUE_REQUIRED,
'force' => false,
'skip-permissions-setup' => false,
])
{
$services_runner_file = $this->getConfig()->get('drupal.service_parameters');
Expand All @@ -357,10 +355,6 @@ public function servicesSetup(array $options = [
$collection = [];
$collection[] = $this->taskFilesystemStack()->copy($services_options_file, $services_destination_file, (bool) $options['force']);

if (!$options['skip-permissions-setup']) {
$collection[] = $this->permissionsSetup($options);
}

return $this->collectionBuilder()->addTaskList($collection);
}

Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@
- "WriteConfiguration('web/sites/default/drushrc.php'"
- "File\\Write('./drush/drush.yml')"

- command: 'drupal:services-setup --service-parameters=runner.yml'
configuration: []
composer: ''
contains:
- "Filesystem\\FilesystemStack()\n ->copy('runner.yml', 'build/sites/default/services.yml'"

- command: 'drupal:settings-setup'
configuration: []
composer: ''
Expand Down

0 comments on commit 2186813

Please sign in to comment.