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

MySQL error when trying to run Behat tests on my VM #1424

Closed
modcab opened this issue Apr 24, 2017 · 1 comment
Closed

MySQL error when trying to run Behat tests on my VM #1424

modcab opened this issue Apr 24, 2017 · 1 comment

Comments

@modcab
Copy link
Contributor

modcab commented Apr 24, 2017

My system information:

  • Operating system type: macOS Sierra
  • Operating system version: 10.12.4
  • BLT version: 8.8.3,

Output of blt doctor:

blt > doctor:
Changed current directory to /Users/m0d/.composer
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
+----------------------+----------------------------------------------------------------------------------+
| Property             | Value                                                                            |
+----------------------+----------------------------------------------------------------------------------+
| %paths               |                                                                                  |
|  - %root             | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot                                   |
|  - %site             | sites/default                                                                    |
|  - %modules          | modules                                                                          |
|  - %themes           | themes                                                                           |
|  - %config-sync      | /Users/m0d/Sites/m0dlabs/mirum/blttest/config/default                            |
| blt-version          | 8.8.3                                                                            |
| config-sync          | /Users/m0d/Sites/m0dlabs/mirum/blttest/config/default                            |
| db-driver            | mysql                                                                            |
| db-hostname          | localhost                                                                        |
| db-name              | drupal                                                                           |
| db-password          | drupal                                                                           |
| db-port              | 3306                                                                             |
| db-username          | drupal                                                                           |
| drupal-settings-file | sites/default/settings.php                                                       |
| drupal-version       | 8.3.1                                                                            |
| drush-alias-files    | /Users/m0d/.drush/nokiaopenup.aliases.drushrc.php                                |
|                      | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot/../drush/site-aliases/aliases.dru |
|                      | shrc.php                                                                         |
|                      | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot/../drush/site-aliases/example.acs |
|                      | f.aliases.drushrc.php                                                            |
|                      | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot/../drush/site-aliases/example.loc |
|                      | al.aliases.drushrc.php                                                           |
| drush-conf           | /Users/m0d/Sites/m0dlabs/mirum/blttest/drush/drushrc.php                         |
| drush-script         | /Users/m0d/Sites/m0dlabs/mirum/blttest/vendor/drush/drush/drush.php              |
| drush-temp           | /tmp                                                                             |
| drush-version        | 8.1.11                                                                           |
| local-drushrc        | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot/sites/default/local.drushrc.php   |
| local-settings       | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot/sites/default/settings/local.sett |
|                      | ings.php                                                                         |
| modules              | modules                                                                          |
| php-bin              | /usr/bin/php                                                                     |
| php-conf             | /etc/php.ini                                                                     |
| php-os               | Darwin                                                                           |
| root                 | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot                                   |
| site                 | sites/default                                                                    |
| themes               | themes                                                                           |
| uri                  | http://local.blttest.com                                                         |
+----------------------+----------------------------------------------------------------------------------+
+--------------------------+---------------------------------------------------------------------------------+
| Check                    | Outcome                                                                         |
+--------------------------+---------------------------------------------------------------------------------+
| checkDocrootExists       | Found docroot.                                                                  |
| checkCoreExists          | Drupal core exists                                                              |
| checkSettingsFile        | BLT settings are included in settings file.                                     |
| checkLocalSettingsFile   | Found your local settings file.                                                 |
| checkLocalDrushFile      | Found your local drush settings file.                                           |
| checkUri                 | $options['uri'] is set.                                                         |
| checkUriResponse         | Did not get a response from http://local.blttest.com                            |
|                          |                                                                                 |
|                          | Is your *AMP stack running?                                                     |
|                          | Is your web server configured to serve this URI from                            |
|                          | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot?                                 |
|                          | Is $options['uri'] set correctly in                                             |
|                          | /Users/m0d/Sites/m0dlabs/mirum/blttest/docroot/sites/default/local.drushrc.php? |
|                          |                                                                                 |
|                          | To generate settings files and install Drupal, run `blt local:setup`            |
|                          |                                                                                 |
| checkFileSystem:%files   | Public files directory is not set.                                              |
| checkFileSystem:%private | Private files directory is not set.                                             |
| checkFileSystem:%temp    | Temporary files directory is not set.                                           |
| checkDbConnection        | Could not connect to MySQL database.                                            |
|                          |                                                                                 |
|                          | Is your *AMP stack running?                                                     |
|                          | Are your database credentials correct?                                          |
|                          |   db-driver: mysql                                                              |
|                          |   db-hostname: localhost                                                        |
|                          |   db-username: drupal                                                           |
|                          |   db-password: drupal                                                           |
|                          |   db-name: drupal                                                               |
|                          |   db-port: 3306                                                                 |
|                          |                                                                                 |
|                          | To verify your mysql credentials, run `mysql -u drupal -h localhost -pdrupal -P |
|                          | 3306`                                                                           |
|                          |                                                                                 |
|                          | Are you using the correct PHP binary?                                           |
|                          | Is PHP using the correct MySQL socket?                                          |
|                          |   php-os: Darwin                                                                |
|                          |   php-bin: /usr/bin/php                                                         |
|                          |   php-conf: Array                                                               |
|                          |   php-mysql:                                                                    |
|                          |                                                                                 |
|                          | Are you using the correct site and settings.php file?                           |
|                          |   site: sites/default                                                           |
|                          |   drupal-settings-file: sites/default/settings.php                              |
|                          |                                                                                 |
|                          | To verify, run `drush sqlc`                                                     |
|                          |                                                                                 |
| checkDrupalBootstrapped  | Could not bootstrap Drupal via drush without alias.                             |
| checkCaching:page        | Drupal cache is disabled.                                                       |
| checkCaching:css         | CSS preprocessing is disabled.                                                  |
| checkCaching:js          | JS preprocessing is disabled.                                                   |
| checkNvmExists           | NVM does not exist.                                                             |
|                          |                                                                                 |
|                          | It is recommended that you use NVM to manage multiple versions of NodeJS on one |
|                          | machine.                                                                        |
|                          | Instructions for installing NVM can be found at:                                |
|                          |   https://github.com/creationix/nvm#installation                                |
| checkComposer:require    | acquia/blt is in composer.json's require object.                                |
| checkComposer:plugins    | hirak/prestissimo plugin for composer is installed.                             |
| checkBehat:exists        | Behat local settings file exists.                                               |
| checkProjectYml:keys     | project.yml has no deprecated keys.                                             |
| checkPhpDateTimezone     | PHP setting for date.timezone is correctly set                                  |
+--------------------------+---------------------------------------------------------------------------------+

BUILD FINISHED; 4.1455 seconds

When I run this command:

blt tests:behat

I get the following output:

[error]  MySql is not available. Please run `blt doctor` to diagnose the issue.

And I expected this to happen:
This is a clean install via a VM. I expected example Behat tests to run, instead I think it's looking for my MySQL installation. Thanks!

@modcab
Copy link
Contributor Author

modcab commented Apr 24, 2017

Ok, I just saw the right way to do it

    # ssh into vm & run behat tests
    drush @[project.machine_name].local ssh
    blt tests:behat

http://blt.readthedocs.io/en/8.x/readme/next-steps/

@modcab modcab closed this as completed Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant