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

Unittest of methods in main.py #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hlijuen
Copy link

@hlijuen hlijuen commented May 8, 2024

Issue #, if available:
https://taskei.amazon.dev/tasks/V1358739306

Description of changes:
The file, test_cfn.py, containing test cases for various methods in main.py is added.
This file tests the following methods specified in main.py.

    get_policy_check_type()
    get_required_inputs(policy_check)
    get_optional_inputs(policy_check)
    get_sub_command(inputFields, areRequiredFields)
    get_treat_findings_as_non_blocking_flag(policy_check)
    build_command(policy_check, required_inputs=required_inputs, optional_inputs=optional_inputs
    execute_command(command)
    set_output(val)

Each test case sends in various input parameters to verify the correctness of the output from the tested methods.

The file, .github/workflows/unittest.yaml, is also added to run unit tests on pull _equest or push.

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.

None yet

1 participant