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

Security analytics latest tests #825

Merged

Conversation

amsiglan
Copy link
Contributor

@amsiglan amsiglan commented Sep 6, 2023

Description

Updated tests for security analytics dashboards plugin

Check List

  • 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: Amardeepsingh Siglani <[email protected]>
@amsiglan amsiglan force-pushed the security-analytics-latest-tests branch from 453f8d0 to 7832d58 Compare September 6, 2023 23:16
Signed-off-by: Amardeepsingh Siglani <[email protected]>
@kavilla
Copy link
Member

kavilla commented Sep 7, 2023

@amsiglan should this go into 2.10?

@amsiglan
Copy link
Contributor Author

amsiglan commented Sep 7, 2023

@amsiglan should this go into 2.10?

Yes, it would be nice if it did. I have the tests passing locally but not sure why they are failing to run altogether here

@kavilla
Copy link
Member

kavilla commented Sep 7, 2023

manual backport: #826

Copy link
Member

@kavilla kavilla left a comment

Choose a reason for hiding this comment

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

#834 will suffer from the same issue here

* updated commands to avoid duplication

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated command header for create rule; changed url for searching rules

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* fix linter issues

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
@amsiglan
Copy link
Contributor Author

amsiglan commented Sep 8, 2023

#834 will suffer from the same issue here

Updated the tests in this PR

@amsiglan
Copy link
Contributor Author

#834 will suffer from the same issue here

Updated the tests in this PR

Updated this PR with all the latest changes that were merged for 2.10

Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

The only major blocker here is the cypress commands. They are quite generic and can overide similar commands that other tests rely on. Ideally we should split them such that Security analytics specific commands are namespaced and others are moved to the common commands folder, but i'm also okay with just namespacing for now.

@amsiglan
Copy link
Contributor Author

amsiglan commented Oct 5, 2023

The only major blocker here is the cypress commands. They are quite generic and can overide similar commands that other tests rely on. Ideally we should split them such that Security analytics specific commands are namespaced and others are moved to the common commands folder, but i'm also okay with just namespacing for now.

Will look into moving common commands to a shared location. For now added sa_ prefix to all commands to make them unique enough

Signed-off-by: Amardeepsingh Siglani <[email protected]>
@kavilla
Copy link
Member

kavilla commented Oct 10, 2023

How is this getting ran? I get failures locally like:

root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: rule_topic is missing;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: rule_topic is missing;"},"status":400}',

@amsiglan
Copy link
Contributor Author

How is this getting ran? I get failures locally like:

root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: rule_topic is missing;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: rule_topic is missing;"},"status":400}',

The tests passed locally after the changes in latest commit

@amsiglan
Copy link
Contributor Author

Screenshots with tests passing locally:

  1. Detectors spec:
image
  1. Rules spec:
image
  1. Alerts spec:
image
  1. Findings spec:
image

@kavilla kavilla merged commit 85c7195 into opensearch-project:main Oct 11, 2023
38 of 40 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-825-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 85c7195aef4ba6ee55a91b025bf614198966886d
# Push it to GitHub
git push --set-upstream origin backport/backport-825-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-825-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.11 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.11 2.11
# Navigate to the new working tree
cd .worktrees/backport-2.11
# Create a new branch
git switch --create backport/backport-825-to-2.11
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 85c7195aef4ba6ee55a91b025bf614198966886d
# Push it to GitHub
git push --set-upstream origin backport/backport-825-to-2.11
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.11

Then, create a pull request where the base branch is 2.11 and the compare/head branch is backport/backport-825-to-2.11.

amsiglan added a commit to amsiglan/opensearch-dashboards-functional-test that referenced this pull request Oct 11, 2023
* updated tests

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* excluded a couple tests; fixed alerts tests

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* dummy change to trigger tests

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* Updated cypress commands to avoid duplication (opensearch-project#835)

* updated commands to avoid duplication

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated command header for create rule; changed url for searching rules

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* fix linter issues

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated mappings for test index (opensearch-project#841)

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* avoid clicking filter menu btn twice (opensearch-project#849)

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* removed check for url since it differs with and without security (opensearch-project#863)

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* namespaced all commands; updated tests for 2.11

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* addressed PR comments

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
kavilla pushed a commit that referenced this pull request Oct 11, 2023
* updated tests



* excluded a couple tests; fixed alerts tests



* dummy change to trigger tests



* Updated cypress commands to avoid duplication (#835)

* updated commands to avoid duplication



* updated command header for create rule; changed url for searching rules



* fix linter issues



---------



* updated mappings for test index (#841)



* avoid clicking filter menu btn twice (#849)



* removed check for url since it differs with and without security (#863)



* namespaced all commands; updated tests for 2.11



* addressed PR comments



---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 11, 2023
* updated tests

* excluded a couple tests; fixed alerts tests

* dummy change to trigger tests

* Updated cypress commands to avoid duplication (#835)

* updated commands to avoid duplication

* updated command header for create rule; changed url for searching rules

* fix linter issues

---------

* updated mappings for test index (#841)

* avoid clicking filter menu btn twice (#849)

* removed check for url since it differs with and without security (#863)

* namespaced all commands; updated tests for 2.11

* addressed PR comments

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit c1f8c39)
ruanyl pushed a commit that referenced this pull request Jan 22, 2024
* updated tests

* excluded a couple tests; fixed alerts tests

* dummy change to trigger tests

* Updated cypress commands to avoid duplication (#835)

* updated commands to avoid duplication

* updated command header for create rule; changed url for searching rules

* fix linter issues

---------

* updated mappings for test index (#841)

* avoid clicking filter menu btn twice (#849)

* removed check for url since it differs with and without security (#863)

* namespaced all commands; updated tests for 2.11

* addressed PR comments

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit c1f8c39)

Co-authored-by: Amardeepsingh Siglani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants