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

Integration test: Repeating test suites with different containerized environments #45

Merged
merged 2 commits into from
Mar 31, 2023

Conversation

mariomac
Copy link
Contributor

The aim of this PR is being able to run the integration tests both in services that embed debug info and services that don't. But it will be also useful to test the auto-instrumenter when, instead of the executable name, we specify the port name.

Now the docker-compose environment can be configured via environment. And instead of spinning it up/down from the Makefile, we do it from the Go tests.

The normal "Tests" will be now run as subtests of higher-level suites. Each suite will:

  • Spinup the Docker cluster and optionally override the configuration.
  • Run the subtests
  • Destroy the Docker cluster

Now we have two suites:

  1. the baseline suite that just runs the HTTP RED metrics test with the default values
  2. a suite that forces the instrumented service to be built without debug information, and then run again the HTTP RED metrics test.

@mariomac mariomac requested a review from grcevski March 31, 2023 15:30
@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2023

Codecov Report

Merging #45 (6162c9d) into main (81d7cf7) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #45   +/-   ##
=======================================
  Coverage   50.30%   50.30%           
=======================================
  Files          14       14           
  Lines         833      833           
=======================================
  Hits          419      419           
  Misses        378      378           
  Partials       36       36           
Flag Coverage Δ
unittests 50.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! This is awesome, I can't wait to try it. I am thinking I can now use this for the gRPC integration tests, as well as maybe adding an HTTPS service test.

@mariomac mariomac merged commit 8c6fda6 into grafana:main Mar 31, 2023
@mariomac mariomac deleted the multitests branch May 4, 2023 12:49
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.

None yet

3 participants