ministryofjustice / modernisation-platform

A place for the core work of the Modernisation Platform • This repository is defined and managed in Terraform
https://user-guide.modernisation-platform.service.justice.gov.uk
MIT License
679 stars 290 forks source link

Unit Tests for Cloudtrail/Support modules in Baselines #7307

Closed richgreen-moj closed 1 month ago

richgreen-moj commented 2 months ago

User Story

As a MP Engineer I need to write some unit tests for the Cloudtrail and Support sub-modules sin the Baselines module So that I can increase the confidence in the modules

Value / Purpose

As a follow-on from https://github.com/ministryofjustice/modernisation-platform/issues/6490 this ticket is to add missing unit tests for some of the sub-modules in the MP Baselines module.

There are roughly 9 resources for unit testing.

Useful Contacts

@richgreen-moj

Additional Information

Follow-on from https://github.com/ministryofjustice/modernisation-platform/issues/6490

Proposal / Unknowns

No response

Definition of Done

ep-93 commented 1 month ago

cloudtrail ✅ - write a follow-up story to test (8 resources) https://github.com/ministryofjustice/modernisation-platform/issues/7307

support ✅ - write a follow-up story to test (1 resource) https://github.com/ministryofjustice/modernisation-platform/issues/7307

These are the resources we need to test.

mikereiddigital commented 1 month ago

I'm picking up this one as I've not done much with unit tests & go before. If anyone wants to pair with me on it then do shout. :)

mikereiddigital commented 1 month ago

Branch containing the completed support module unit test - https://github.com/ministryofjustice/modernisation-platform-terraform-baselines/tree/issue/7307. This has been tested locally against testing-test.

sukeshreddyg commented 1 month ago

Added unit tests for the Support and CloudTrail modules.

https://github.com/ministryofjustice/modernisation-platform-terraform-baselines/pull/547

markgov commented 1 month ago

just checked and the unit test is failing /home/runner/work/modernisation-platform-terraform-baselines/modernisation-platform-terraform-baselines/test/go.mod:5: unknown directive: toolchain

mikereiddigital commented 1 month ago

Go issue resolved with PR https://github.com/ministryofjustice/modernisation-platform-terraform-baselines/pull/551

markgov commented 1 month ago

All looks good