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

[cmd/opampsupervisor] Add integration/E2E tests #27002

Merged
merged 7 commits into from
Dec 12, 2023

Conversation

evan-bradley
Copy link
Contributor

@evan-bradley evan-bradley commented Sep 19, 2023

Description:

Add tests that verify the Supervisor's behavior using a real Collector binary against an OpAMP server written with the opamp-go library. This tests a basic set of functionality mostly based on what is currently listed as implemented in the Supervisor's feature table.

Right now these tests start the Supervisor using the Go API to avoid process handling, but could be changed to start it through a binary in the future. I've placed these tests in the E2E testing workflow even though they run fairly quickly since they depend on a built Collector binary, may become more expansive in the future, and don't fit in any of the existing jobs in the build-and-test workflow. I'm open to placing them in another location if we'd prefer them elsewhere.

This also updates opamp-go to v0.9.0 to take advantage of open-telemetry/opamp-go#200.

Link to tracking Issue:

Resolves #24292

@evan-bradley evan-bradley added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Sep 20, 2023
@evan-bradley evan-bradley force-pushed the supervisor-e2e-tests branch 2 times, most recently from c0e0537 to 8190ff2 Compare September 21, 2023 18:35
@tigrannajaryan
Copy link
Member

@evan-bradley ping me when this is ready for review.

@evan-bradley evan-bradley marked this pull request as ready for review September 22, 2023 16:37
@evan-bradley evan-bradley requested a review from a team September 22, 2023 16:37
@evan-bradley
Copy link
Contributor Author

@tigrannajaryan The tests are passing in CI now, this is ready for review. Please take a look.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

Thanks for adding these @evan-bradley, it is great to have e2e tests for the supervisor.
I left some comments/questions to help me understand how the tests work.

cmd/opampsupervisor/e2e_test.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/e2e_test.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/e2e_test.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/e2e_test.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/e2e_test.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/e2e_test.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/e2e_test.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/e2e_test.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/e2e_test.go Show resolved Hide resolved
Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

LGTM, just one minor comment.

cmd/opampsupervisor/e2e_test.go Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Nov 1, 2023

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 1, 2023
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@evan-bradley
Copy link
Contributor Author

@atoulme Could you please take a look?

cmd/opampsupervisor/go.mod Outdated Show resolved Hide resolved
Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

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

Nothing jumps at me as worthy of pushback, it's great to see more testing. LGTM

@evan-bradley evan-bradley merged commit 411c707 into open-telemetry:main Dec 12, 2023
85 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/opampsupervisor Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cmd/opampsupervisor] Add integration tests
5 participants