-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cascade delete #64
Cascade delete #64
Conversation
src/main/java/org/opentripplanner/middleware/persistence/TypedPersistence.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/persistence/TypedPersistence.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/otp/OtpRequestProcessor.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/auth/Auth0Users.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/auth/Auth0Users.java
Outdated
Show resolved
Hide resolved
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.
See comments. Also, I'm having trouble running the E2E tests locally. Let's discuss my configuration details off Github.
Codecov Report
@@ Coverage Diff @@
## dev #64 +/- ##
============================================
- Coverage 34.87% 32.33% -2.54%
Complexity 139 139
============================================
Files 71 71
Lines 1580 1676 +96
Branches 143 159 +16
============================================
- Hits 551 542 -9
- Misses 1016 1121 +105
Partials 13 13
Continue to review full report at Codecov.
|
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.
The mock createApiKeyRequest
call and something in canSimulateApiUserFlow
broke with the changes introduced. (On the dev branch the tests are working fine for me.)
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 added more comments.
src/main/java/org/opentripplanner/middleware/controllers/api/ApiController.java
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/controllers/api/OtpUserController.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/models/AbstractUser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/models/OtpUser.java
Outdated
Show resolved
Hide resolved
| AUTH0_CLIENT_ID | N/A | Special E2E application client ID. | | ||
| AUTH0_CLIENT_SECRET | N/A | Special E2E application client secret. | |
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.
These new variables should appear in env.yml.tmp
.
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'm not sure that's the case if they're only intended for e2e.
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.
User signup is still broken, for a different reason this time. Merge conflicts need to be resolved.
src/main/java/org/opentripplanner/middleware/controllers/api/ApiController.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/middleware/ApiKeyManagementTest.java
Outdated
Show resolved
Hide resolved
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.
See comment here: #64 (comment). I guess it's good to go after that.
|
||
@Override | ||
public boolean delete() { | ||
// FIXME: Check that the Auth0 user ID being deleted does not exist as a different child class? |
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.
Yep. Admin users will have to be careful when deleting ApiUsers or OtpUsers.
* Helper method to determine if end to end is enabled and auth is disabled. (Used for checking if tests should run.) | ||
*/ | ||
public static boolean isEndToEndAndAuthIsDisabled() { | ||
return getBooleanEnvVar("RUN_E2E") && authDisabled(); |
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.
Philosophical question: do we still need to have the DISABLE_AUTH config parameter in that case?
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.
Totally agree with what you're getting at. I think I commented this somewhere else. I'll create an issue: #68
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.
Great job @br648 and @landonreed
Checklist
dev
before they can be merged tomaster
)Description
Tests to simulate API user flow. The following config parameters must be set in configurations/default/env.yml for these end-to-end tests to run:
http://localhost:8080/otp
so the mock OTP server is used/routers/default/plan
The following environment variable must be set for these tests to run:
RUN_E2E: true
Auth0 must be correctly configured as described here: https://auth0.com/docs/flows/call-your-api-using-resource-owner-password-flow.