-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add functional test (PoC) #14
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Functional test uses a OTel collector deployed in a container and configured via provided relay.yaml I include two approaches on how to deal with Docker: - Using Docker cli go sdk https://docs.docker.com/engine/api/sdk/examples/ - Using https://golang.testcontainers.org/ To run locally: go test -v ./tests Note: the TestContainers runs an additional container https://golang.testcontainers.org/features/garbage_collector/#ryuk •2024/02/16 15:23:08 github.com/testcontainers/testcontainers-go - Connected to docker: Server Version: 24.0.5 API Version: 1.43 Operating System: Docker Desktop Total Memory: 7851 MB Resolved Docker Host: unix:///Users/<REDACTED>/.docker/run/docker.sock Resolved Docker Socket Path: /var/run/docker.sock Test SessionID: 608c6fc97809c2ab6ad833b50fa3e7d9636c70d5ebbe1337b406179f44e47f32 Test ProcessID: c59a4d57-e59d-4d3a-8abd-0d6135a9403f 2024/02/16 15:23:08 🐳 Creating container for image testcontainers/ryuk:0.6.0 2024/02/16 15:23:08 ✅ Container created: d34d1f0a58e9 2024/02/16 15:23:08 🐳 Starting container: d34d1f0a58e9 2024/02/16 15:23:08 ✅ Container started: d34d1f0a58e9 2024/02/16 15:23:08 🚧 Waiting for container id d34d1f0a58e9 image: testcontainers/ryuk:0.6.0. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms} 2024/02/16 15:23:09 🔔 Container is ready: d34d1f0a58e9 2024/02/16 15:23:09 🐳 Creating container for image otel/opentelemetry-collector-contrib:0.88.0 2024/02/16 15:23:09 ✅ Container created: a6bd9d6293bb 2024/02/16 15:23:09 🐳 Starting container: a6bd9d6293bb 2024/02/16 15:23:09 ✅ Container started: a6bd9d6293bb 2024/02/16 15:23:09 🚧 Waiting for container id a6bd9d6293bb image: otel/opentelemetry-collector-contrib:0.88.0. Waiting for: &{timeout:<nil> Log:Everything is ready. Begin running and processing data. IsRegexp:false Occurrence:1 PollInterval:100ms} 2024/02/16 15:23:09 🔔 Container is ready: a6bd9d6293bb •
github-actions
bot
added
dependencies
Pull requests that update a dependency file
tests
Pull requests that update tests
labels
Feb 16, 2024
Dependency ReviewThe following issues were found:
License Issuesgo.mod
Allowed Licenses: Apache-1.1, Apache-2.0, BSD-2-Clause, BSD-3-Clause, BSL-1.0, ISC, MIT, NCSA, OpenSSL, Python-2.0, X11 Scanned Manifest Filesgo.mod
|
@pleshakov it's one of the licenses that can be used but needs to be reviewed case by case. |
I like the container approach better, cleaner look. |
Same. Looks easier to work with |
Same, I like the container approach. |
+1 to the container approach, just easier! |
thanks for the feedback. We;ll go with the test containers approach |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Functional test uses a OTel collector deployed in a container and configured via provided relay.yaml
I include two approaches on how to deal with Docker:
To run locally:
go test -v ./tests
Note: the TestContainers runs an additional container https://golang.testcontainers.org/features/garbage_collector/#ryuk
Closes #7
Which approach would you prefer?
Checklist
Before creating a PR, run through this checklist and mark each as complete.
guide