-
Notifications
You must be signed in to change notification settings - Fork 281
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
[BUG-1402] Return HTTP 409 on version confict when creating & updating tenants - added relevant unit test #3673
Conversation
Signed-off-by: Prabhas Kurapati <[email protected]>
@peternied I'm getting the same error in these test where the CI tests cannot find package org.opensearch.test.framework, very confused on why this is happening since the local tests are working. |
src/test/java/org/opensearch/security/dlic/rest/api/TenantInfoActionTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Prabhas Kurapati <[email protected]>
src/integrationTest/java/org/opensearch/security/rest/TenantAsyncActionTest.java
Show resolved
Hide resolved
src/test/java/org/opensearch/security/dlic/rest/api/TenantInfoActionTest.java
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.
Thank you @prabhask5. This PR looks good to me. I left a few comments to address and will approve once all comments have been addressed.
src/integrationTest/java/org/opensearch/security/rest/TenantAsyncActionTest.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.
There are some styling/import errors in CI. Could you please address those?
This PR looks good to me otherwise
src/integrationTest/java/org/opensearch/security/rest/TenantAsyncActionTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Prabhas Kurapati <[email protected]>
@peternied I'm getting errors now that can't resolve |
@prabhask5 Please look into the test failures |
@prabhask5 Are you still working on this? |
Doesn't look like this is being worked on anymore, going to close this out. Please feel free to reopen if you re-engage on this @prabhask5 |
Description
Added new TenantsActionApiTest file to put api unit tests for the /api/tenants api call- additionally wrote new unit test to test for parallel PUT /tenant/{name} calls, that they successfully return a 409 call and retry the call.
Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)
Test fix
Why these changes are required?
There was no test that checked for the behavior mentioned in the linked ticket, so previously we didn't know if the issue still existed or not (it apparently was fixed before), to make sure this doesn't happen again for this particular case, I decided to write a concrete test for it.
What is the old behavior before changes and new behavior after changes?
Test was added, there's no behavior change?
Issues Resolved
Testing
Added new tenant action unit test to test parallel tenant api calls.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.