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

test: update test framework to use latest best practices and reduce boilerplate #100

Merged
merged 12 commits into from
Jun 25, 2024

Conversation

gmeligio
Copy link
Contributor

@gmeligio gmeligio commented Jun 20, 2024

what

Update this module's test framework. Reduce boilerplate and make reusable functions.

Changelog:

  1. Upgrade go to 1.21.
  2. Update test/Makefile and test/src/Makefile from https://github.com/cloudposse/terraform-aws-eks-node-group/tree/e9f908c026d8ca5dc30190a050de68a510ff3983/test
  3. Create framework_test.go and default_test.go, following how it's done in https://github.com/cloudposse/terraform-aws-eks-node-group/blob/e9f908c026d8ca5dc30190a050de68a510ff3983/test/src/framework_test.go
  4. Remove enabled=true from fixtures and add new test TestExamplesCompleteDisabled for when enabled=false
  5. Add Test_ExistingDeployment for faster test cycle, and modify Makefile accordingly
  6. Update dependencies
  7. Migrate test DB Engine from 3.6.0 to 5.0.0

why

  • Enable testing with OpenTofu
  • Support automated maintenance

references

@mergify mergify bot added the triage Needs triage label Jun 20, 2024
Copy link

mergify bot commented Jun 20, 2024

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@mergify mergify bot added the needs-cloudposse Needs Cloud Posse assistance label Jun 20, 2024
@gmeligio
Copy link
Contributor Author

/terratest

@gmeligio gmeligio marked this pull request as ready for review June 20, 2024 00:02
@gmeligio gmeligio requested review from a team as code owners June 20, 2024 00:02
@gmeligio gmeligio requested review from hans-d and nitrocode June 20, 2024 00:02
@Nuru Nuru requested a review from a team as a code owner June 20, 2024 09:58
@Nuru Nuru force-pushed the update-test-framework branch from 9e6421b to 2569d13 Compare June 20, 2024 10:02
@Nuru
Copy link

Nuru commented Jun 20, 2024

/terratest

@Nuru
Copy link

Nuru commented Jun 20, 2024

/terratest

@Nuru Nuru added no-release Do not create a new release (wait for additional code changes) migration This PR involves a migration and removed triage Needs triage labels Jun 20, 2024
Benbentwo
Benbentwo previously approved these changes Jun 21, 2024
Copy link
Member

@Benbentwo Benbentwo left a comment

Choose a reason for hiding this comment

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

LGTM thanks everyone

@Nuru Nuru self-requested a review June 22, 2024 08:34
Copy link

@Nuru Nuru left a comment

Choose a reason for hiding this comment

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

@mcalhoun Has a bunch of improvements he told me he would like to see on these test (deferring more to Terratest, using more standard ways of skipping the "existing deployment" test, etc.), so let's give him a few days to make those changes.

@Nuru
Copy link

Nuru commented Jun 25, 2024

/terratest

@Nuru Nuru self-requested a review June 25, 2024 00:52
Copy link

@Nuru Nuru left a comment

Choose a reason for hiding this comment

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

@mcalhoun Will get to fixing these tests later. This is good enough for now. I added comments about how this is work-in-progress and should not be duplicated.

@Nuru Nuru self-requested a review June 25, 2024 00:53
@Nuru Nuru merged commit cb776c0 into cloudposse:main Jun 25, 2024
14 checks passed
@mergify mergify bot removed the needs-cloudposse Needs Cloud Posse assistance label Jun 25, 2024
@gmeligio gmeligio deleted the update-test-framework branch June 25, 2024 06:35
Copy link

These changes were released in v0.26.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration This PR involves a migration no-release Do not create a new release (wait for additional code changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants