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

Take 2: Splunkbase download updates courtext res260 #327

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

Res260
Copy link
Contributor

@Res260 Res260 commented Nov 14, 2024

This is basically all the changes our private fork have at the moment.

Here is what it includes:

  • Bugfix: bad stack trace when a test search fails
  • Bugfix: add a setup step for contentctl test: wait_for_app_installation. This step ensures that the required apps are correctly installed AND configured (for splunk ES)
  • Bugfix: add a 20 secs sleep after starting the container in contentctl test to ensure Docker has the time to map the ports correctly before contentctl attempts to connect. This was problematic on Windows with WSL.
  • Bugfix: Fix downloading apps from SplunkBase, which used to work but didn't anymore.
  • Bugfix: Fix a bug where contentctl validate and contentctl build needed the splunkbase creds to work, which made no sense.
  • Fix typo
  • Feature: Introduction of a logger object in the hope of gradually replacing usage of print() statements
  • Feature: contentctl test now creates missing indexes specified in test data as custom_index
  • Change: Send tests data to the HEC as text and not binary
  • Change: Add a message that makes debugging failed tests easier.

Fixes #319
Fixes #295
Fixes #321

@pyth0n1c So sorry to open a new PR, but this was the only way for me to contribute without having to send patch files like a caveman. We should close #322 and use this PR as well. It includes a lot of changes, but I think they are all changes worthy to be included upstream and fixes weird bugs regarding using contentctl test on Windows and downloading apps from SplunkBase.

Res260 and others added 25 commits October 24, 2024 13:11
…shed when specifying a `detection.tags.asset_type`. Fixes splunk#313.
Do not serialize TestApp.hardcoded_path if it has value None. Fixes #…
Fix a bug where the jinja template for `analyticsories_detection` cra…
…password to be specified w...

Allow test.splunk_api_username and test.splunk_api_password to be specified with environment variables SPLUNKBASE_USERNAME and SPLUNKBASE_PASSWORD to avoid putting credentials in YAML files.
Do not serialize TestApp.hardcoded_path if it has value None. Fixes #…
Fix a bug where App_Base.getSplunkbasePath() was broken and did not w…
…base.

Fix du setup initial + téléchargement depuis splunkbase.
…or tests

Add support for dynamically creating custom_index for tests
- Bugfix: add a setup step for `contentctl test`: `wait_for_app_installation`. This step ensures that the required apps are correctly installed AND configured (for splunk ES)
- Bugfix: add a 20 secs sleep after starting the container in `contentctl test` to ensure Docker has the time to map the ports correctly before contentctl attempts to connect. This was problematic on Windows with WSL.
- Bugfix: Fix path to download apps from SplunkBase
- Bugfix: Fix a bug where `contentctl validate` and `contentctl build` needed the splunkbase creds to work, which made no sense.
- Fix typo
- Feature: Introduction of a logger object in the hope of gradually replacing usage of `print()` statements
- Feature: `contentctl test` now creates missing indexes specified in test data as `custom_index`
- Change: Send tests data to the HEC as text and not binary
- Change: Add a message that makes debugging failed tests easier.
@Res260
Copy link
Contributor Author

Res260 commented Nov 14, 2024

I will merge with main to make sure nothing breaks with the latest changes on main.

@pyth0n1c
Copy link
Contributor

I will merge with main to make sure nothing breaks with the latest changes on main.

Thank you, this is great and very helpful. I will deprecate that other PR and take a look at this one!

@pyth0n1c pyth0n1c self-assigned this Nov 14, 2024
@Res260
Copy link
Contributor Author

Res260 commented Nov 14, 2024

I merged with main, ran my manual tests, everything is working fine on my end!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants