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

Nginx integration test #3377

Merged
merged 6 commits into from
May 12, 2021

Conversation

jsirianni
Copy link
Member

@jsirianni jsirianni commented May 12, 2021

Description:

Some receivers have integration tests leveraging Docker containers. This PR adds Nginx integration testing following that same pattern. This implementation is inspired by jmxreceiver's integration tests.

The test will:

  1. Build an Nginx image with /status metrics enabled
  2. Starts the container exposing an unprivileged port (8080)
  3. Build a receiver targeting the Nginx container
  4. Scrape metrics from the Nginx process

TODO: These could be handled in future pull requests. I would like to receive some feedback or direction before proceeding.

  • Add tests that check for failure
  • Add tests that validate metrics

Link to tracking Issue:

resolves #3376

Testing:

Testing with a valid Nginx config is successful. Removing the /status endpoint from Nginx (disabling metrics) will cause the test to fail.

Documentation:

No documentation was added. These tests run with the existing make integration-tests-with-cover command.

@jsirianni jsirianni requested a review from a team May 12, 2021 14:07
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bogdandrutu
Copy link
Member

Please rebase and run make gotidy

@jsirianni
Copy link
Member Author

Please rebase and run make gotidy

All set 👍

@bogdandrutu bogdandrutu merged commit 6b9e20e into open-telemetry:main May 12, 2021
alexperez52 referenced this pull request in open-o11y/opentelemetry-collector-contrib Aug 18, 2021
… calls (#3377)

Fixes couple of bugs from PR#3322, see comments in that PR.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nginxreceiver - Integration Test
4 participants