microsoft/symphony

Remove Terratest Module Unit Tests from Symphony

robcamer opened this issue · 2 comments

ISSUE:
Symphony includes Terratest unit tests in this folder:
https://github.com/microsoft/symphony/tree/main/IAC/Terraform/test/terraform

These unit tests create and destroy additional infrastructure to unit test the Terratest module. This is additional technical debt that a customer should not have to take on and could be confusing.

RECOMMENDATION:
Remove the Terratest module unit tests from this folder in Symphony. They should just need to exist in the Gruntworks-io/terratest repo as part of their product support.

Customers should not worry about maintaining code for Terratest modules as part of their code base. Customers should just focus on:

  • Authoring Terraform (or bicep)
  • Using Terratest modules to verify that their Terraform has deployed per the required configuration.

If a Terratest module fails, the customer should open an issue on Terratest for support / assistance and not worry about maintaining unit tests for Terratest modules.

Hi @robcamer , The module/unit tests are samples for how to write test on the resources modules. They test the sample Terraform modules (02_sql, and 03_webapp) as independent units and not the Terratest modules, and failures on these tests are failures in the sample terraform modules due to changes in them and not the public Terratest azure modules.

Like the rest of the reference app implementation content, these tests will be removed/updated once the user bring their own Terraform implementation and there is no technical debt that needs to be maintained

hattan commented

@robcamer - I think there might be some confusion on the unit tests. These tests are not unit testing the Terratest modules, rather they are testing individual deployments in symphony. Symphony's layered architecture breaks layers into unique deployments (Terraform modules) and these tests are meant to show an example of testing individual modules (or groupings of them under a layer.)

The unit tests exist to allow the layered modules to have a different testing cycle from end to end pipelines. For deployment we use the end to end tests as they test how the modules interact and that they are configured correctly to work together.