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

Test Origin Login APIs #154

Merged

Conversation

joereuss12
Copy link
Contributor

This is a unit test for the origin login api's. The tests have been ran on both windows and in a linux container and shows everything running successfully. This effectively tests:

  1. Code-based login when no password is set
  2. Password reset API
  3. Password-based login API
  4. "whoami" API

This is a unit test for the origin login api's. This effectively tests:
1. Code-based login when no password is set
2. Password reset API
3. Password-based login API
4. "whoami" API
The tests have been ran on both windows and in a linux container and shows everything running successfully.
@joereuss12 joereuss12 linked an issue Sep 27, 2023 that may be closed by this pull request
@joereuss12 joereuss12 added this to the v7.1.0 milestone Sep 27, 2023
@joereuss12 joereuss12 requested a review from bbockelm September 27, 2023 19:40
@bbockelm bbockelm requested review from turetske and removed request for bbockelm September 28, 2023 13:45
@bbockelm bbockelm added the internal Internal code improvements, not user-facing label Sep 28, 2023
@bbockelm
Copy link
Collaborator

Changing the reviewer over to Emma.

Copy link
Collaborator

@turetske turetske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG except for possibly some changes in how temp files are being created and the addition of two more test cases as discussed in the specific comments.

origin_ui/origin_test.go Outdated Show resolved Hide resolved
origin_ui/origin_test.go Show resolved Hide resolved
I added 2 new tests per Emma's request. In addition I also discovered fatal errors with the test itself. I noticed I forgot to add a `m.Run()` line to my TestMain() so the tests were not actually running. Once adding this the tests were failing because I was setting up the handles multiple times. So instead of configuring origin ui every time I just reconfigure the AuthDB whenever I add a user.
Copy link
Collaborator

@turetske turetske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@turetske turetske merged commit 3ff7858 into PelicanPlatform:main Sep 28, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Internal code improvements, not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test origin login APIs
3 participants