Skip to content

[feature/BLAZ-2484] to dev - #477

Merged
smaneroiriusrisk merged 4 commits into
devfrom
feature/BLAZ-2484
Oct 22, 2025
Merged

smaneroiriusrisk merged 4 commits into
devfrom
feature/BLAZ-2484

Conversation

@abausac

@abausac abausac commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

Add Terraform plan tests for startleft

@smaneroiriusrisk smaneroiriusrisk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The VALIDATION UC1 and UC5 described in the task are not covered by the TestOTMControllerIaC.test_controller_no_iac_file or TestOTMControllerIaC.test_controller_no_mapping_file as the error message and the error type does not match. The main reason is the decorator @check_mime_type is not working for the test when you send a file as None. If we remove the decorator from the controller the test would still working.

The PROCESSOR UC3 ask for the hcp-tfplan/opt-792 uses cases. You refer to the TestOTMControllerIaC."test_mapping_files_validations_success" implementations, but I miss the use case which send both default_mapping_file and mapping_file. We have to assure this case is forbidden. Is this test case implemented?

Comment thread tests/integration/api/controllers/iac/tfplan/test_otm_controller_iac_tfplan.py Outdated
Comment thread slp_tfplan/tests/integration/test_tfplan_processor.py Outdated
@abausac

abausac commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

The VALIDATION UC1 and UC5 described in the task are not covered by the TestOTMControllerIaC.test_controller_no_iac_file or TestOTMControllerIaC.test_controller_no_mapping_file as the error message and the error type does not match. The main reason is the decorator @check_mime_type is not working for the test when you send a file as None. If we remove the decorator from the controller the test would still working.

The PROCESSOR UC3 ask for the hcp-tfplan/opt-792 uses cases. You refer to the TestOTMControllerIaC."test_mapping_files_validations_success" implementations, but I miss the use case which send both default_mapping_file and mapping_file. We have to assure this case is forbidden. Is this test case implemented?

About the UC1 and UC5, the API has a different response (the expected as ticket described) than test response.
The error message check done in the test for UC1 and UC5 (iac_file and mapping_file as None) was removed, as it makes no sense to check a non possible message.

In the case of the PROCESSOR UC3, the code already exists (done for Cloudformation, in BLAZ-2411), in:

def test_mapping_files_validations_errors(self, files, title, detail, error_message):

abausac and others added 2 commits October 21, 2025 08:42
… fixed typo, removed non possible error messages checks and added happy path for no custom mapping call.
@smaneroiriusrisk
smaneroiriusrisk merged commit 3515cec into dev Oct 22, 2025
9 checks passed
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