Skip to content

[chore] Remove usages of extensionauthtest.MockClient#38401

Merged
mx-psi merged 2 commits into
open-telemetry:mainfrom
mx-psi:mx-psi/remove-uses-of-authtestmockclient
Mar 5, 2025
Merged

[chore] Remove usages of extensionauthtest.MockClient#38401
mx-psi merged 2 commits into
open-telemetry:mainfrom
mx-psi:mx-psi/remove-uses-of-authtestmockclient

Conversation

@mx-psi
Copy link
Copy Markdown
Member

@mx-psi mx-psi commented Mar 5, 2025

Description

All usages of extensionauthtest.MockClient can be replaced by a simple extensionauth.NewClient + passing the appropriate options.

There is one use case that is maybe useful to have a helper for: errors, which are used in confighttp tests.

This PR removes usages of extensionauthtest.MockClient so that we can remove the MockClient and replace it with something that allows for a sealed interface/struct for extensionauth.Client

@mx-psi mx-psi merged commit 9aab87e into open-telemetry:main Mar 5, 2025
@github-actions github-actions Bot added this to the next release milestone Mar 5, 2025
github-merge-queue Bot pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request Mar 6, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Removes `extensionauthtest.MockClient`. Users can use either
`extensionauth.NewClient` or use `extensionauthtest.NewErrorClient` as a
convenience method to replicate the `MustError` field behavior.

Doing a Github search, I am unable to find usages of this outside of
contrib, which I dealt with on PR
open-telemetry/opentelemetry-collector-contrib/pull/38401, thus I
believe this should be fine to remove in one go.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants