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

[receiver/elasticsearch] Add integration test #10165

Closed
djaglowski opened this issue May 19, 2022 · 6 comments
Closed

[receiver/elasticsearch] Add integration test #10165

djaglowski opened this issue May 19, 2022 · 6 comments
Assignees
Labels
priority:p3 Lowest test coverage Improve test coverage

Comments

@djaglowski
Copy link
Member

It should be possible to add a containerized integration test to this receiver.

@Frapschen
Copy link
Contributor

hi, l'd to help it, how can I start? any example?

@dmitryax
Copy link
Member

@Frapschen Ok, assigned to you

@dmitryax dmitryax added priority:p3 Lowest test coverage Improve test coverage labels May 20, 2022
@BinaryFissionGames
Copy link
Contributor

Hey @Frapschen, thanks for volunteering to help out.

The task is essentially to create an integration test that:

  1. Starts an elasticsearch docker container
  2. Initializes the elasticsearchreceiver component from it's factory
  3. Scrapes metrics from the docker container
  4. Validates that the expected metrics are scraped (using the scrapertest package)

As far as examples go, there are a few components out there that have integration tests using the same pattern.
For instance:

Mysql receiver integration test
Nginx receiver integration test

@Frapschen
Copy link
Contributor

ok, I wil check these pattern and work on the es one.

@Frapschen
Copy link
Contributor

follow the Mysql receiver integration test,I start up an es container and Initializes the elasticsearchreceiver, everthing is look good except I get nil value of actualMtrics.orig.ResourceMetrics.

@djaglowski
Copy link
Member Author

Closed by #10361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p3 Lowest test coverage Improve test coverage
Projects
None yet
Development

No branches or pull requests

4 participants