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
merged 2 commits into from Jul 4, 2017

Conversation

3 participants
@aaemnnosttv
Contributor

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.

E.g. https://github.com/aaemnnosttv/wp-cli-valet-command/blob/af1ee1123c3d2fa991a5d4a6ba982db14b966397/.travis.yml#L8-L11

@gitlost

gitlost approved these changes Jul 4, 2017

@gitlost

This comment has been minimized.

Show comment
Hide comment
@gitlost

gitlost Jul 4, 2017

Contributor

Thanks @aaemnnosttv!

Contributor

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
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment