Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add Functionality of OTP to support user 2fa #603
Add Functionality of OTP to support user 2fa #603
Changes from 6 commits
62bf691
331084f
8567c5e
cf55d67
efc4d0f
c1f999d
d8cc1f8
91d67fb
a3fe95d
5da2caa
df6c951
ad0a24a
8cb7210
2c50255
2f118a9
6ae586a
421c0a1
5ae0627
ff78885
3dcaf5a
4a78690
1fe820d
9f49854
3d7d780
d32299f
e138c6f
feabd07
e325bf7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 wrote this test but can't actually run it because the test framework does not have user interactions. How should i test something that is dependant on user interaction, server time sensitive date, then running the test?
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.
Ah, I see. Yeah, it's a little harder than I first thought.
Here's my suggestion:
GHAuthorization
that came back from the server.createTokenOtp()
.takeSnapshot
with yourself as the user.assumeFalse("Test only valid when not proxying", mockGitHub.isUseProxy());
to the top of your method.This will help people understand what this method is for and will ensure if someone goes to change it they have some idea of what needs to be done.
Cool?
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.
ok, cool, so the takeSnapshot will record the user interaction. I would then bake in the OTP code during the capture that I get, into the unit test, to match the header data. That way it can be run in mock. Is that right?