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

How do we test the oauth2_google function without a valid key? #16

Closed
jandix opened this issue Mar 5, 2019 · 4 comments
Closed

How do we test the oauth2_google function without a valid key? #16

jandix opened this issue Mar 5, 2019 · 4 comments
Assignees
Labels
strategy::google oauth type::question Further information is requested

Comments

@jandix
Copy link
Owner

jandix commented Mar 5, 2019

We need a valid oauth2_google jwt to test the function properly. How do we include this token in the tests since it is only valid for an hour?

@jandix jandix added type::question Further information is requested strategy::google oauth labels Mar 5, 2019
@jandix jandix added this to To do in setup and first strategies via automation Mar 5, 2019
@jandix jandix self-assigned this Mar 5, 2019
@friep
Copy link
Collaborator

friep commented Mar 14, 2019

The only thing I can come up with is setting up a server somewhere that constantly refreshes a token at google and makes this token available in an (authenticated) API. We could then fetch this token in the tests (including auth details for the API in travis via secrets). But I'm not sure whether this is really a good idea, sounds a bit insecure (token has to travel across the internet) and a lot of overhead for setting up this server. :D

@friep
Copy link
Collaborator

friep commented Mar 25, 2019

too much effort -> tests are only run locally on developers' machine

@friep friep closed this as completed Mar 25, 2019
setup and first strategies automation moved this from To do to Done Mar 25, 2019
@friep friep reopened this Apr 17, 2019
setup and first strategies automation moved this from Done to In progress Apr 17, 2019
@friep
Copy link
Collaborator

friep commented Apr 17, 2019

test again how we can implement tests.
maybe we can mock a token and / or mock out functions from the is_authed function to make it pass.
While working on #37 I found that we definitely need tests for this function.

friep pushed a commit that referenced this issue Apr 18, 2019
friep pushed a commit that referenced this issue Apr 20, 2019
friep pushed a commit that referenced this issue Apr 20, 2019
friep pushed a commit that referenced this issue Apr 20, 2019
friep pushed a commit that referenced this issue Apr 20, 2019
friep pushed a commit that referenced this issue Apr 20, 2019
friep pushed a commit that referenced this issue Apr 20, 2019
friep pushed a commit that referenced this issue Apr 20, 2019
@friep
Copy link
Collaborator

friep commented Apr 20, 2019

see #38

@friep friep closed this as completed Apr 20, 2019
setup and first strategies automation moved this from In progress to Done Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
strategy::google oauth type::question Further information is requested
Projects
Development

No branches or pull requests

2 participants