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

remove deprecated service #780

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ewollesen
Copy link
Contributor

This service was deprecated in 2018. Let's finish the migration.

The data service is the only place that used the deprecated service. I started by expanding the data service to include both a deprecated service and the new service. Then when I had all the tests at equity, I dropped out the old deprecated service.

So all the things that were tested in the deprecated service are still tested (the only thing that wasn't already tested was part of the Authenticated service).

Before this is merged, I'd probably squash it done to a single commit. I'm leaving the separate commits in case someone wants to see the step by step of how I tried to make sure nothing was missed in the migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This did nothing, so I removed it. I guess it needed to be compiled and run by ginkgo, so... getting rid of it seems like a good thing.

That and the disappointment of reading the client code, then looking for the tests only to find that the file is empty. :(

toddkazakov
toddkazakov previously approved these changes Oct 5, 2024

Context("AuthClient", func() {
It("returns successfully with server token", func() {
//runtime.Breakpoint()
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do

…w service

The AuthClient test removal is the only thing I find in any way controversial
here. That test requests the auth client, then calls a method on it, to ensure
that it returns what is expected. However, since the new service doesn't
initialize that auth client itself, rather, it's just returning whatever is
passed to it via a setter, there's no point in testing this here.
The previous commit did drop one test, because it didn't apply to the new
Service. That test does apply to Authenticated however. This commit restores
that test, which checks that the configuration passed to the service via the
config reporter is able to successfully initialize an authentication client.
I believe there is no loss in test coverage through this action.

I manually compared the old tests and new tests to see that they covered the
same concepts. Most of them were duplicates to begin with. The one that wasn't
duplicated already, was moved to authenticated_test.go in a previous commit.

Since the deprecated service is no more, these tests are no longer
necessary. They had already be retro-fitted to test the replacement
service.Service anyway, where they all passed.
@ewollesen ewollesen force-pushed the eric-platform-deprecated-service branch from 31315a1 to 87e2501 Compare October 7, 2024 15:37
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.

2 participants