-
Notifications
You must be signed in to change notification settings - Fork 36
Calculate and return days remaining in get signup response #432
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
Calculate and return days remaining in get signup response #432
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #432 +/- ##
==========================================
+ Coverage 78.10% 78.14% +0.03%
==========================================
Files 41 41
Lines 2677 2681 +4
==========================================
+ Hits 2091 2095 +4
Misses 491 491
Partials 95 95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 haven't seen any PR for the changes in toolchain-e2e, could you please create one?
|
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 to me but I would get rid of the DaysRamaining thing and let the UI calculate it from the EndDate if needed.
DaysRemaining is now removed. |
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 don't see any unit test that would verify the case when the ScheduledDeactivationTimestamp/ProvisionedTime is not set - we need to make sure that the empty string is returned in this case.
Sorry if I missed it somewhere.
Added check to existing test to ensure |
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.
Nice 👍 Thanks for the extra changes 🙏
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexeykazakov, MatousJobanek, sbryzak 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 |
If the UserSignup.Status.ScheduledDeactivationTimestamp property is set, then use it to calculate the number of days remaining in the user's trial and return that value in the get signup response.
e2e tests: codeready-toolchain/toolchain-e2e#995