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: Allow test DB user + pass to be set by env vars #4196

merged 2 commits into from Jul 4, 2017


3 participants

aaemnnosttv commented Jul 4, 2017

This is something that I added for the valet command because I needed to be able to test creation and deletion of databases other than wp_cli_test. Rather than granting more permissions, I felt it would be much easier to just use different credentials. I think this could be useful in other situations as well.

In case you're wondering the !== false check on the password var is to allow for an empty password to be set with WP_CLI_TEST_DBPASS="", where the others cannot be empty.



gitlost approved these changes Jul 4, 2017


This comment has been minimized.

Show comment
Hide comment

gitlost Jul 4, 2017


Thanks @aaemnnosttv!


gitlost commented Jul 4, 2017

Thanks @aaemnnosttv!

@danielbachhuber danielbachhuber added this to the 1.3.0 milestone Jul 4, 2017

@gitlost gitlost merged commit 3cc957c into wp-cli:master Jul 4, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment