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

WIP on fix for tests in InternalUsersScoreBasedPasswordRulesRestApiIntegrationTest #32

Open
wants to merge 28 commits into
base: 2.18
Choose a base branch
from

Conversation

cwperks
Copy link
Owner

@cwperks cwperks commented Oct 25, 2024

Description

WIP on opensearch-project#4845

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • 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: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@cwperks cwperks changed the title .Test initialization 2.18 WIP on fix for tests in InternalUsersScoreBasedPasswordRulesRestApiIntegrationTest Oct 25, 2024
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@willyborankin
Copy link
Collaborator

@cwperks, thank you for fixing it! Now, each test initializes only once, right?

@cwperks
Copy link
Owner Author

cwperks commented Oct 26, 2024

@cwperks, thank you for fixing it! Now, each test initializes only once, right?

Yes that's the idea. It also switches to using the @ Before method which does not need to be static and will allow the use of polymorphism for the test. I'm not sure this is the best way just yet which is why it's in a PR on my fork, but I wanted to open this PR to show the code I've already created.

@willyborankin
Copy link
Collaborator

@cwperks, thank you for fixing it! Now, each test initializes only once, right?

Yes that's the idea. It also switches to using the @ Before method which does not need to be static and will allow the use of polymorphism for the test. I'm not sure this is the best way just yet which is why it's in a PR on my fork, but I wanted to open this PR to show the code I've already created.

I was planning to do the same. The original idea was to boot up the cluster only once as result all tests passed fast and you can run in you IDEA :-) but unfortunately it was a good idea.

@cwperks
Copy link
Owner Author

cwperks commented Oct 26, 2024

@cwperks, thank you for fixing it! Now, each test initializes only once, right?

Yes that's the idea. It also switches to using the @ Before method which does not need to be static and will allow the use of polymorphism for the test. I'm not sure this is the best way just yet which is why it's in a PR on my fork, but I wanted to open this PR to show the code I've already created.

I was planning to do the same. The original idea was to boot up the cluster only once as result all tests passed fast and you can run in you IDEA :-) but unfortunately it was a good idea.

If it can be dynamically changed in a single cluster that would be great, but I don't think it's possible. Please feel free to push to this branch. I'm not sure this is the best way to solve these tests.

@willyborankin
Copy link
Collaborator

@cwperks, thank you for fixing it! Now, each test initializes only once, right?

Yes that's the idea. It also switches to using the @ Before method which does not need to be static and will allow the use of polymorphism for the test. I'm not sure this is the best way just yet which is why it's in a PR on my fork, but I wanted to open this PR to show the code I've already created.

I was planning to do the same. The original idea was to boot up the cluster only once as result all tests passed fast and you can run in you IDEA :-) but unfortunately it was a good idea.

If it can be dynamically changed in a single cluster that would be great, but I don't think it's possible. Please feel free to push to this branch. I'm not sure this is the best way to solve these tests.

Yes it is. It is my bad :-)

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.

2 participants