DataDog / orchestrion

Automatic compile-time instrumentation of Go code
http://datadoghq.dev/orchestrion/
Apache License 2.0
159 stars 5 forks source link

chore: separate integration tests in its own packages #277

Closed rarguelloF closed 1 month ago

rarguelloF commented 1 month ago

Change the behavior of the code generation from _integration-tests to generate individual test files in each test package.

This speeds up significantly when running only one test suite, which is particularly useful when developing a new integration.

Also, this change is required for https://github.com/DataDog/orchestrion/pull/273, where we are testing both confluent-kafka-go v1 and v2. Since both of them depend on CGO librdkafka, they cannot coexist in the same package.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 88.40580% with 16 lines in your changes missing coverage. Please review.

Project coverage is 73.27%. Comparing base (b11a160) to head (6544831). Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
_integration-tests/utils/generator/main.go 75.75% 12 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #277 +/- ## ========================================== + Coverage 72.41% 73.27% +0.86% ========================================== Files 140 142 +2 Lines 7511 7574 +63 ========================================== + Hits 5439 5550 +111 + Misses 1672 1617 -55 - Partials 400 407 +7 ``` | [Components](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [Generators](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `77.07% <75.75%> (+9.43%)` | :arrow_up: | | [Instruments](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `88.05% <ø> (ø)` | | | [Go Driver](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `72.81% <ø> (ø)` | | | [Toolexec Driver](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `66.56% <ø> (ø)` | | | [Aspects](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `71.79% <ø> (ø)` | | | [Injector](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `73.24% <ø> (ø)` | | | [Job Server](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `63.76% <ø> (+0.56%)` | :arrow_up: | | [Integration Test Suite](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `87.64% <88.40%> (+2.21%)` | :arrow_up: | | [Other](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `73.27% <88.40%> (+0.86%)` | :arrow_up: | | [Files with missing lines](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [\_integration-tests/tests/chi.v5/chi.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fchi.v5%2Fchi.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL2NoaS52NS9jaGkuZ28=) | `100.00% <100.00%> (ø)` | | | [\_integration-tests/tests/echo.v4/echo.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fecho.v4%2Fecho.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL2VjaG8udjQvZWNoby5nbw==) | `100.00% <100.00%> (ø)` | | | [\_integration-tests/tests/fiber.v2/fiber.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Ffiber.v2%2Ffiber.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL2ZpYmVyLnYyL2ZpYmVyLmdv) | `100.00% <100.00%> (ø)` | | | [\_integration-tests/tests/gin/gin.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fgin%2Fgin.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL2dpbi9naW4uZ28=) | `100.00% <100.00%> (ø)` | | | [\_integration-tests/tests/grpc/grpc.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fgrpc%2Fgrpc.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL2dycGMvZ3JwYy5nbw==) | `100.00% <100.00%> (ø)` | | | [\_integration-tests/tests/mux/mux.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fmux%2Fmux.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL211eC9tdXguZ28=) | `100.00% <100.00%> (ø)` | | | [\_integration-tests/tests/net\_http/net\_http.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fnet_http%2Fnet_http.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL25ldF9odHRwL25ldF9odHRwLmdv) | `86.60% <100.00%> (ø)` | | | [\_integration-tests/tests/os/lfi.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fos%2Flfi.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL29zL2xmaS5nbw==) | `77.77% <100.00%> (ø)` | | | [\_integration-tests/utils/net.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Futils%2Fnet.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3V0aWxzL25ldC5nbw==) | `100.00% <100.00%> (ø)` | | | [\_integration-tests/utils/suite.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree&filepath=_integration-tests%2Futils%2Fsuite.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3V0aWxzL3N1aXRlLmdv) | `100.00% <100.00%> (ø)` | | | ... and [1 more](https://app.codecov.io/gh/DataDog/orchestrion/pull/277?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/DataDog/orchestrion/pull/277/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog)