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

Add back tests for Authentication/Authorization in backend #432

Open
maia-iyer opened this issue May 14, 2024 · 2 comments
Open

Add back tests for Authentication/Authorization in backend #432

maia-iyer opened this issue May 14, 2024 · 2 comments
Labels
backend Tornjak API (Backend) good first issue Good for newcomers

Comments

@maia-iyer
Copy link
Collaborator

With the recent refactoring of code, the tests for authentication and authorization were removed. We should refactor and put these tests back.

Previous tests are found here

@maia-iyer maia-iyer added good first issue Good for newcomers backend Tornjak API (Backend) labels May 14, 2024
@ankiiisharma
Copy link

hey @maia-iyer , can you please elaborate this more. i am willing to work on this. thanks

@maia-iyer
Copy link
Collaborator Author

maia-iyer commented May 15, 2024

Hello that's awesome!

So this is a backend work in Golang.

Under ./pkg/agent, we have some libraries authentication and authorization. These were created from this PR which refactored an older library auth. The old code for the auth library is here.

If you look closer, the newer authentication and authorization libraries are mostly the same code as the auth library. However, as part of this refactoring, this specific file with the tests got deleted.

We need to bring those tests back to the code. Taking a look, it seems all of the tests that were written are only testing the authentication pkg, so I think it's a matter of making a copy of the file to the authentication folder and testing it, seeing if it works out of box, or if adjustments need to be made. Possibly some function names or variable names need to be changed.

Definitely follow up and let me know if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Tornjak API (Backend) good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants