Skip to content

[Metricbeat] fix default config for mysql tests#11218

Merged
fearful-symmetry merged 1 commit intoelastic:masterfrom
fearful-symmetry:mysql-go-test-fix
Mar 13, 2019
Merged

[Metricbeat] fix default config for mysql tests#11218
fearful-symmetry merged 1 commit intoelastic:masterfrom
fearful-symmetry:mysql-go-test-fix

Conversation

@fearful-symmetry
Copy link
Copy Markdown
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