Skip to content

Commit

Permalink
[receiver/sqlquery] sqlserver integration tests, improved coverage (#…
Browse files Browse the repository at this point in the history
…36922)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Mainly added test for sqlserver, plus added coverage for logs (as
requested in
[comment](#35195 (review)))

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #29695

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Main changes:
* Added metrics tests for SqlServer
* Covered MySql, SqlServer and Oracle for logs

Improvements:

- To avoid repetitions, changed approach to "parameterized" tests - run
the same test flow for different database engines (for logs only).
- Do not hardcode "localhost" and host port, get these values from
testcontainers.
- Replaced inserting test values into the database from running CLI
commands in the container to executing SQL commands.
- Updated Oracle init script to use `otel` schema instead of `sys`.

Important: For Oracle and SQL Server, tests are **skipped** (tested
locally) - I expect them to fail due to #27577 (which was not fixed but
closed due to inactivity).
<!--Describe the documentation added.-->
<!--Please delete paragraphs that you did not use before submitting.-->
  • Loading branch information
Grandys authored Jan 29, 2025
1 parent 7f430de commit ac0f08e
Show file tree
Hide file tree
Showing 7 changed files with 560 additions and 379 deletions.
Loading

0 comments on commit ac0f08e

Please sign in to comment.