-
Notifications
You must be signed in to change notification settings - Fork 159
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
Adding mysql integration tests #4067
Adding mysql integration tests #4067
Conversation
samiura
commented
Dec 14, 2023
•
edited by atoulme
Loading
edited by atoulme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good to merge if tests pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor nits, thanks for adding tests!
tests/receivers/mysql/mysql_test.go
Outdated
|
||
var mysql = []testutils.Container{testutils.NewContainer().WithContext( | ||
path.Join(".", "testdata", "server"), | ||
).WithName("mysql").WithExposedPorts("3306:3306").WillWaitForPorts("3306").WillWaitForLogs("X Plugin ready for connections. Bind-address:")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: 3306
is used a few times in this file, maybe move it to a variable?
ENV MYSQL_ROOT_PASSWORD='testuser' | ||
|
||
COPY initMySqlDB.sql /docker-entrypoint-initdb.d/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
digest_text_limit: 120 | ||
time_limit: 24h | ||
limit: 250 | ||
exporters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exporters: | |
exporters: |
endpoint: "${OTLP_ENDPOINT}" | ||
tls: | ||
insecure: true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- instrumentation_scope: | ||
attributes: {} | ||
name: otelcol/mysqlreceiver | ||
version: <ANY> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version: <ANY> | |
version: <VERSION_FROM_BUILD> |
tests/receivers/mysql/mysql_test.go
Outdated
"github.com/signalfx/splunk-otel-collector/tests/testutils" | ||
) | ||
|
||
var mysql = []testutils.Container{testutils.NewContainer().WithContext( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, until this is shared no need to make global
tests/receivers/mysql/mysql_test.go
Outdated
// This test ensures the collector can connect to a MySQL DB, and properly get metrics. It's not intended to | ||
// test the receiver itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wading into semantics, these tests are partially intended to test the underlying components. Though some of the expectations we have about the reported telemetry may need to be updated (resource metric file changes), they can detect breaking changes or bugs that may have been missed upstream.
38819b6
to
8f77451
Compare