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

Removed Moq dependency from Exporter.OpenTelemetryProtocol.Tests #5118

Merged
merged 9 commits into from
Dec 5, 2023

Conversation

ngruson
Copy link
Contributor

@ngruson ngruson commented Dec 2, 2023

Related to #4758.
Refactor in order to remove the Moq dependency from the OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests project.

Changes

  • Added MockHttpMessageHandler
  • Added MockExportClient
  • Removed Moq dependency

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@ngruson ngruson requested a review from a team December 2, 2023 18:09
Copy link

codecov bot commented Dec 2, 2023

Codecov Report

Merging #5118 (578301e) into main (bb3a91a) will increase coverage by 0.23%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

❗ Current head 578301e differs from pull request most recent head f51b19a. Consider uploading reports for the commit f51b19a to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5118      +/-   ##
==========================================
+ Coverage   82.81%   83.05%   +0.23%     
==========================================
  Files         296      296              
  Lines       12320    12320              
==========================================
+ Hits        10203    10232      +29     
+ Misses       2117     2088      -29     
Flag Coverage Δ
unittests 83.05% <ø> (+0.23%) ⬆️

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

see 5 files with indirect coverage changes


namespace OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.Mock;

internal class MockExportClient<T>(bool throwException = false) : IExportClient<T>
Copy link
Member

Choose a reason for hiding this comment

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

same as #5116 (comment)

@ngruson
Copy link
Contributor Author

ngruson commented Dec 5, 2023

Test failed due a Docker error 503 Service Unavailable in SqlClient.Tests.
Seems unrelated to this PR?

@utpilla utpilla merged commit 5ca1124 into open-telemetry:main Dec 5, 2023
39 checks passed
@ngruson ngruson deleted the remove-moq-exporter-otlp-tests branch December 5, 2023 20:00
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.

3 participants