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

[Metricbeat] fix default config for mysql tests #11218

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

fearful-symmetry
Copy link
Contributor

This fixes an issue I discussed in slack with @ruflin . Namely, if you run the mysql integration tests on a host environment via go test -tags=integration, it throws an error:

=== RUN   TestFetchRaw
[mysql] 2019/03/12 11:50:11 driver.go:123: could not use requested auth plugin 'mysql_native_password': this user requires mysql native password authentication.

This is due to how we set the mysql config object when MYSQL_DSN isn't set via docker-compose

Most other integration tests hard-code ports/hostnames in cases where a given env var isn't set, so what I've done seems fairly standard, but if anyone objects, please tell me and I can get more clever. Only other thing of note is the use of mysql.NewConfig() which seems to be the "preferred" way of creating a new mysql config.

@fearful-symmetry fearful-symmetry merged commit c7ec7d4 into elastic:master Mar 13, 2019
@fearful-symmetry fearful-symmetry deleted the mysql-go-test-fix branch March 13, 2019 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants