chore(otlp-exporter-*-proto): clean up tests #5199
Merged
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.
Which problem is this PR solving?
All the functionality that's duplicate-tested in all the HTTP/protobuf exporters is now tested in the exporter base packages as well as in
@opentelemetry/otlp-transformer
for serialization. This PR is similar to #5196 and #5198, but for the HTTP protobuf exporters.This PR removes the tests from the individual exporters and replaces them with a simple check that tests if
The previous implementation was heavily relying on constructing export data and asserting the data that is sent, which makes changes to the SDK's internal structure very difficult. This testing is now all handled in
@opentelemetry/otlp-transformer
so there should be no need to test this again in every individual exporter.I also added a comment for future contributors that this tests file is not where they should add any tests that concern base components.
Partially enables #4583 (types exported from
@opentelemetry/otlp-transformer
are used in testing, by removing test usages, we can remove types that were only used in tests from the public API)Type of change
How Has This Been Tested?