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

What's the correct pattern for testing authenticated routes? #2019

Open
lamba92 opened this issue Aug 7, 2020 · 3 comments
Open

What's the correct pattern for testing authenticated routes? #2019

lamba92 opened this issue Aug 7, 2020 · 3 comments
Labels

Comments

@lamba92
Copy link

lamba92 commented Aug 7, 2020

What would be a good pattern to test authenticated routes? Is it ok to generate real credentials? If not, how can you pass the authorization?

@lamba92 lamba92 added the feature label Aug 7, 2020
@jonathanoff2022
Copy link

Any news?

@victororlyk
Copy link

Don't know if it is correct way, but what I do.

For tests I am using testcontainers and kotest. On startup of testapplication I am creating dummy user( which will use real endpoint to login - function which cqn be used on repeat Some common functions) and then i am making other requests with real token. Don't see any problem with it

@FunkyMuse
Copy link

Don't know if it is correct way, but what I do.

For tests I am using testcontainers and kotest. On startup of testapplication I am creating dummy user( which will use real endpoint to login - function which cqn be used on repeat Some common functions) and then i am making other requests with real token. Don't see any problem with it

I've been doing the same, minus kotest, this hasn't had an answer in a long time, I guess we might never receive an official way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants