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 tests for python code #2759

Merged
merged 2 commits into from
Apr 27, 2024
Merged

Add tests for python code #2759

merged 2 commits into from
Apr 27, 2024

Conversation

cyberbuff
Copy link
Collaborator

Details:
Added tests for python code to find defects earlier

Testing:
Tested on PRs #16

Associated Issues:

  • Fixed an issue where either generate-counter or generate-docs works. This is because Github Push protection fails on one of the files. Whenever we rerun the workflow, you have an option to only rerun one of the workflows and the files are not being updated properly. I merged both of the workflows to generate-docs for now. Github push protection doesn't have per file ignores. Its either all or none.

Comment on lines +7 to +8
paths:
- "atomic_red_team/**/*.py"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Run python tests only on python file changes in atomic_red_team

Comment on lines +13 to +14
from atomic_red_team.common import used_guids_file, atomics_path
from atomic_red_team.guid import (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Absolute paths are required for running python tests

@@ -0,0 +1,18 @@
attack_technique: T1003
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

atomic_red_team/tests would contain all the test cases for code within atomic_red_team/**/*.py

@cyberbuff cyberbuff added the python Pull requests that update Python code label Apr 27, 2024
@clr2of8 clr2of8 merged commit 82fc8d4 into master Apr 27, 2024
3 checks passed
@cyberbuff cyberbuff deleted the add_tests branch July 12, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants