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

[BUG-1402] Return HTTP 409 on version confict when creating & updating tenants - added relevant unit test #3673

Conversation

prabhask5
Copy link
Contributor

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

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Prabhas Kurapati <[email protected]>
@prabhask5
Copy link
Contributor Author

@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.

Signed-off-by: Prabhas Kurapati <[email protected]>
@prabhask5 prabhask5 requested a review from peternied November 14, 2023 07:02
Copy link
Member

@cwperks cwperks left a 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.

Copy link
Member

@DarshitChanpura DarshitChanpura left a 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

Signed-off-by: Prabhas Kurapati <[email protected]>
@prabhask5
Copy link
Contributor Author

@peternied I'm getting errors now that can't resolve import org.opensearch.security.dlic.rest.api.AbstractRestApiUnitTest;, is this a similar issue where I can't use this package outside of the rest/api folder?

@peternied
Copy link
Member

@prabhask5 Please look into the test failures

@DarshitChanpura
Copy link
Member

@prabhask5 Are you still working on this?

@peternied
Copy link
Member

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

@peternied peternied closed this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants