-
Notifications
You must be signed in to change notification settings - Fork 36
drop service factory and service context abstractions #506
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
drop service factory and service context abstractions #506
Conversation
|
s.Run("init verification success phone number with parenthesis and spaces", func() { | ||
assertInitVerificationSuccess("(226) 821 3045", "9691252ac0ea2cb55295ac9b98df1c51", 2) | ||
}) | ||
assertInitVerificationSuccess(handler, fakeClient, "2268213044", "fd276563a8232d16620da8ec85d0575f", 1) | ||
|
||
s.Run("init verification success phone number with dashes", func() { | ||
assertInitVerificationSuccess("226-821-3044", "fd276563a8232d16620da8ec85d0575f", 3) | ||
}) | ||
s.Run("init verification success phone number with spaces", func() { | ||
assertInitVerificationSuccess("2 2 6 8 2 1 3 0 4 7", "ce3e697125f35efb76357ed8e3b768b7", 4) | ||
s.Run("init verification success phone number with parenthesis and spaces", func() { | ||
assertInitVerificationSuccess(handler, fakeClient, "(226) 821 3045", "9691252ac0ea2cb55295ac9b98df1c51", 2) | ||
|
||
s.Run("init verification success phone number with dashes", func() { | ||
assertInitVerificationSuccess(handler, fakeClient, "226-821-3044", "fd276563a8232d16620da8ec85d0575f", 3) | ||
|
||
s.Run("init verification success phone number with spaces", func() { | ||
assertInitVerificationSuccess(handler, fakeClient, "2 2 6 8 2 1 3 0 4 7", "ce3e697125f35efb76357ed8e3b768b7", 4) | ||
}) | ||
}) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to refactor the format because the sub-tests depend on the previous ones. Previously it wasn't a problem because the factory created a new instance of the service for every call of the VerificationService
method.
type InClusterApplication struct { | ||
serviceFactory *factory.ServiceFactory | ||
signupService service.SignupService | ||
verificationService service.VerificationService | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the next PR(s), we will be able to deal with the services separately as they don't depend on each other anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexeykazakov, MatousJobanek The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/retest |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #506 +/- ##
==========================================
- Coverage 85.33% 85.30% -0.04%
==========================================
Files 32 32
Lines 3116 3109 -7
==========================================
- Hits 2659 2652 -7
Misses 371 371
Partials 86 86
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
feb701c
into
codeready-toolchain:master
KUBESAW-260
Finally first bigger removal at the service abstraction level. This PR drops:
and simplifies the creation of the services.
The PR also contains some necessary fixes in unit tests.