Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tests/phpunit/Bolt tests into /tests #295

Closed
grasmash opened this issue Aug 15, 2016 · 2 comments
Closed

Move tests/phpunit/Bolt tests into /tests #295

grasmash opened this issue Aug 15, 2016 · 2 comments
Labels
Enhancement A feature or feature request

Comments

@grasmash
Copy link
Contributor

grasmash commented Aug 15, 2016

Move tests from template/tests/phpunit/Bolt and template/tests/phpunit/src/TestBase.php to tests/phpunit and ensure that they continue to be executed by template/.travis.yml and pass.

@grasmash grasmash added the ready label Aug 15, 2016
@pixlkat
Copy link
Contributor

pixlkat commented Aug 16, 2016

@grasmash - I'll pick this up, but I do not appear to have access to assign myself.

@pixlkat
Copy link
Contributor

pixlkat commented Aug 17, 2016

@grasmash - After setting up a blt-project directory next to blt as outlined in CONTRIBUTING.md, I am able to get all the phpunit tests to pass with the exception of the drush test. However, I'm not able to actually install drupal using any of the blt commands.

My setup:
Follow steps in CONTRIBUTING.md:

cp -R blt/blt-project .
cd blt-project
git init
composer install
blt init
blt configure
composer update

Follow steps in INSTALL.md which follow blt init/blt configure/composer update. I configured DrupalVM as I normally would, but I left all the defaults for configuration of project name, etc.

blt vm:init
vagrant up
blt local:setup

The drush site-install command results in the following error:

blt > setup:drupal:install:

     [echo] Installing Drupal.
    [drush] Executing '/Users/steph.bridges/workspace/blt-project/vendor/bin/drush @blted8.local --site-name="BLTed 8" --site-mail="no-reply@acquia.com" --account-name="admin" --account-pass="admin" --account-mail="no-reply@acquia.com" --l="default" --nocolor --root=/Users/steph.bridges/workspace/blt-project/docroot --yes --verbose site-install "lightning" "install_configure_form.update_status_module='array(FALSE,FALSE)'"'...
Loaded alias @blted8.local from file                                                                              [notice]
/Users/steph.bridges/workspace/blt-project/docroot/../drush/site-aliases/drupal-vm.aliases.drushrc.php
Begin redispatch via drush_invoke_process().                                                                      [notice]
Calling proc_open(ssh -o PasswordAuthentication=no -i /Users/steph.bridges/.vagrant.d/insecure_private_key vagrant@blted8.localhost 'env COLUMNS=122 drush  --nocolor --root=/Users/steph.bridges/workspace/blt-project/docroot --yes --verbose --uri=default  site-install lightning '\''install_configure_form.update_status_module='\''\'\'''\''array(FALSE,FALSE)'\''\'\'''\'''\''   --site-name='\''BLTed 8'\'' --site-mail='\''no-reply@acquia.com'\'' --account-name=admin --account-pass=admin --account-mail='\''no-reply@acquia.com'\'' 2>&1' 2>&1);
End redispatch via drush_invoke_process().                                                                        [notice]
    [drush]  [error]  Command site-install needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.
    [drush]  [error]  The drush command 'site-install lightning install_configure_form.update_status_module='array(FALSE,FALSE)'' could not be executed.
[phingcall] /Users/steph.bridges/workspace/blt-project/vendor/acquia/blt/phing/tasks/setup.xml:113:85: Drush exited with code 1

BUILD FAILED
/Users/steph.bridges/workspace/blt-project/vendor/acquia/blt/phing/tasks/local-sync.xml:12:30: Execution of the target buildfile failed. Aborting.

Notice drush root is configured to be my local path, not the Drupal VM path. However, it does correctly find the alias.

If I set drush.root in project.local.yml to an empty string, the command now cannot find the alias:

blt > setup:drupal:install:

     [echo] Installing Drupal.
    [drush] Executing '/Users/steph.bridges/workspace/blt-project/vendor/bin/drush @blted8.local --site-name="BLTed 8" --site-mail="no-reply@acquia.com" --account-name="admin" --account-pass="admin" --account-mail="no-reply@acquia.com" --l="default" --nocolor --yes --verbose site-install "lightning" "install_configure_form.update_status_module='array(FALSE,FALSE)'"'...
Could not find the alias @blted8.local                                                                             [error]
Undefined index: command notify.drush.inc:60                                                                      [notice]
Undefined index: command notify.drush.inc:60                                                                      [notice]
[phingcall] /Users/steph.bridges/workspace/blt-project/vendor/acquia/blt/phing/tasks/setup.xml:113:85: Drush exited with code 1

BUILD FAILED
/Users/steph.bridges/workspace/blt-project/vendor/acquia/blt/phing/tasks/local-sync.xml:12:30: Execution of the target buildfile failed. Aborting.

grasmash pushed a commit that referenced this issue Aug 20, 2016
* Moved tests in /template/tests/phpunit to /tests/phpunit.

* Add autoload path for PHPUnit tests.

* Move PSR-4 definition to correct autoload..

* Set correct project directory.

* Add path to drushrc.php to drush.launcher option (#295)

* Change PHPUnit test to look for correct config file in output. (#295)

* Use --format=json on drush command for output.

* Separating blt-project tests from blt tests.

* Fix directory name, move setup to setUp() method.

* Fix namespace, add group, move constructor to setUp().

* Add separate phpunit test calls for travis run.

* Code sniffer cleanup.

* Fixes to allow the tests to be run in a symlinked directory from blt-project.

* Remove redundant test call.
@grasmash grasmash added Enhancement A feature or feature request and removed ready labels Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A feature or feature request
Projects
None yet
Development

No branches or pull requests

2 participants