Skip to content

As a developer, I want to run integration tests for each CI build run #56

Closed
@erikschlegel

Description

Description

As a developer, I want to run integration tests for each CI build run
Running end to end integration tests to validate terraform deployments are operating as expected is essential for enterprises. Similar to bedrock, we'll use terratest in the spirit of following azure devops guidance for terraform deployments. Initially, we'll run a light weight E2E test similar to bedrock's azure-simple integration test.

Creating the terraform template is out of scope for this feature. We'll use the app service terraform hello world sample here as our temporary test bed placeholder until the azure-simple template is released. This integration test should run terraform init, plan, format, destroy and apply on the mocked release and assert that it can establish a connection to the provisioned app service website with a 200 response.

This azure devops build step will get triggered for pull request updates/submissions. The integration test harness should support both local and cloud runs. To simplify local dependency setup we'll use the docker base image from feature #55. We'll need to add a docker build step to the pipeline as the integration test(s) will run as a container.

Acceptance Criteria

  • Should assert that we have a mocked terraform template which our int test can apply which scaffolds a hello world app service website.
  • Should assert that we have a go terratest module that acts as an integration test which validates the response status code of the provisioned app service website.
  • Should assert that the go test run's within a docker container using mage and runs successfully locally and in azure devops.
  • Should assert that the README in the test directory is updated with local and cloud setup instructions.

Also, here are a few points that need to be addressed:

  1. Issues As a developer, I want to setup a base docker image for terraform unit and integration testing #55 and As a developer, I want a AzDO build pipeline triggered for peer code review requests/updates #54 are pre-req's

Resources

Mockups
Include an animated GIF of the build running successfully in azDO

Tasks

*Add the go test harness module to the test folder
*Add a mocked app service website terraform template within environments. This is a temporary solution to validate the test module until azure-simple is released.
*Update the documentation in the test folder.
*Dockerize the test harness run

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions