Skip to content

Unit-Testing using contentctl - #3028

Merged
patel-bhavin merged 77 commits into
developfrom
contentctl_unit_changes
Jul 10, 2024
Merged

patel-bhavin merged 77 commits into
developfrom
contentctl_unit_changes

Conversation

@patel-bhavin

@patel-bhavin patel-bhavin commented Jul 8, 2024 •

Copy link
Copy Markdown
Contributor

This PR enables Unit-testing in Github Actions CI using contentctl.

Additionally added a script to pretty print the pass/failures of detections from summary.yml

image

@patel-bhavin
patel-bhavin requested a review from P4T12ICK as a code owner July 8, 2024 20:18
Comment thread .github/workflows/unit-testing.yml Outdated
pyth0n1c
pyth0n1c previously approved these changes Jul 9, 2024

@pyth0n1c pyth0n1c left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I believe this looks good. After it is merged, we should do some stress-testing where we open a PR from an external (non splunk/security_content member) repo to ensure that the mode:changes functionality works from external forks as well.

Comment thread .github/workflows/build.yml Outdated
@@ -23,29 +21,20 @@ jobs:
run: |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think this workflow needs jq (anymore) can it be removed entirely?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed!

Comment thread .github/workflows/unit-testing.yml Outdated

- name: Install System Packages and contentctl
run: |
sudo apt update -qq

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Now that we are doing the processing with python i think we can remove jq?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed

@patel-bhavin

Copy link
Copy Markdown
Contributor Author

This workflow was also tested on PR from Dean Luxton (Splunker) and it seemed to have worked correctly! You can check the run here :

#3024

@pyth0n1c pyth0n1c left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed workflow and results. Looks great! Approved!

@patel-bhavin
patel-bhavin merged commit 769359e into develop Jul 10, 2024
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