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

Behat Tests Fail #1681

Closed
mikemadison13 opened this issue Jun 16, 2017 · 6 comments
Closed

Behat Tests Fail #1681

mikemadison13 opened this issue Jun 16, 2017 · 6 comments
Assignees
Labels
Bug Something isn't working

Comments

@mikemadison13
Copy link
Contributor

mikemadison13 commented Jun 16, 2017

My system information:

  • Operating system type: Mac OS
  • Operating system version: 10.11.6
  • BLT version: 8.9.x dev

When I run this command:

blt tests:all
blt tests:behat

I get the following output:

Executing command blt tests:behat  --define drush.alias=self inside of Drupal VM...
[warning] The xDebug extension is loaded. This will significantly decrease performance.
[Testing\Behat] Running behat  --format pretty /vagrant/tests/behat --colors --no-interaction --stop-on-failure --strict --config /vagrant/tests/behat/local.yml --profile local --tags '~ajax&&~experimental&&~lightningextension' -v

PHP Fatal error:  Cannot redeclare composerRequire50aaad88ede7074a839163f1fb337cad() (previously declared in /vagrant/vendor/composer/autoload_real.php:63) in /var/www/<project>/vendor/composer/autoload_real.php on line 70

Fatal error: Cannot redeclare composerRequire50aaad88ede7074a839163f1fb337cad() (previously declared in /vagrant/vendor/composer/autoload_real.php:63) in /var/www/<project>/vendor/composer/autoload_real.php on line 70
[Testing\Behat]  Exit code 255 
[error]  Behat tests failed! 

And I expected this to happen:

@mikemadison13
Copy link
Contributor Author

@geerlingguy FYI this seems to be an issue with an interaction between BLT and Vagrant... what @grasmash and I are seeing is that the tests work fine "inside" the VM but when attempting to run outside for some reason things are looking in /vagrant (and when I do a vagrant exec pwd it also points at /vagrant instead of my repo root inside the vm).

I just re-provisioned with a ssh_home variable in box/config.yml... any thoughts on what else might be going on here?

@typhonius
Copy link
Contributor

The documentation here: http://docs.drupalvm.com/en/latest/extras/drupal-console/#remote-command-execution-using-vagrant-exec works when I manually create a Vagrantfile.local. With this in mind, should BLT create a Vagrantfile.local with this config during one of the settings phases?

@grasmash
Copy link
Contributor

@geerlingguy Would you consider adding such setting to Drupal VM?

@geerlingguy
Copy link
Contributor

I would rather go the route @typhonius recommends — see my notes in upstream PR geerlingguy/drupal-vm#1435

@geerlingguy
Copy link
Contributor

Wouldn't it just be a matter of using the path /var/www/${project.machine_name} since that's what's hardcoded and set by BLT here? https://github.com/acquia/blt/blob/8.x/scripts/drupal-vm/config.yml#L15-L20

Also, you may be able to set the values in the already-existing https://github.com/acquia/blt/blob/8.x/scripts/drupal-vm/Vagrantfile (instead of having to also write a Vagrantfile.local).

@geerlingguy
Copy link
Contributor

See PR #1688 — needs work, and I didn't test it, but I think that should be how it's set up in BLT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants