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

Add action tester script #126

Merged
merged 16 commits into from
Jul 24, 2024
Merged

Add action tester script #126

merged 16 commits into from
Jul 24, 2024

Conversation

lvoloshyn-sekoia
Copy link
Contributor

@lvoloshyn-sekoia lvoloshyn-sekoia commented Jun 21, 2024

The simplest way to test is to runpoetry run sekoia-automation run-action --module-name=HTTP --class-name=RequestAction --modules-path="~/PycharmProjects/automation-library" method=get url=https://dummyjson.com/test

Replace ~/PycharmProjects/automation-library with a path to your automation-library folder

Copy link

github-actions bot commented Jun 21, 2024

Test Results

167 tests  ±0   166 ✅ ±0   1m 29s ⏱️ +7s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit fe1700c. ± Comparison against base commit 8073b81.

♻️ This comment has been updated with latest results.

@lvoloshyn-sekoia lvoloshyn-sekoia marked this pull request as ready for review July 3, 2024 12:14
@lvoloshyn-sekoia lvoloshyn-sekoia requested a review from squioc July 3, 2024 12:40
Copy link
Collaborator

@squioc squioc left a comment

Choose a reason for hiding this comment

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

Thanks for the script.
I faced an issue on the Harfanglab module

module.configuration = module_conf

file_path = self.find_file_with_module_item_class()
module_item_cls = self.load_class_from_path(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I tested the script with an action from the Harfanglab automation module and got an error about the harfanglab python module:

$ cd Harfanglab
$ poetry install
$ poetry run pip install git+https://github.com/SEKOIA-IO/sekoia-automation-sdk.git@feat/add_action_test_script
$ poetry run sekoia-automation run-action --module-name=HarfangLab --class-name=GetProcessListAction --modules-path .. target_agents=cs-vm
...
moduleNotFoundError: No module named 'Harfanglab'

@lvoloshyn-sekoia lvoloshyn-sekoia requested a review from squioc July 11, 2024 14:01
squioc
squioc previously approved these changes Jul 23, 2024
Copy link
Collaborator

@squioc squioc left a comment

Choose a reason for hiding this comment

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

LGTM

@lvoloshyn-sekoia lvoloshyn-sekoia requested a review from squioc July 23, 2024 16:36
@squioc squioc merged commit a405fc0 into main Jul 24, 2024
4 checks passed
@squioc squioc deleted the feat/add_action_test_script branch July 24, 2024 09:04
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