This folder contains the automated tests for all of the example code in the /examples folder.
Note: This repo is for demonstration and learning purposes only and should NOT be used to run anything important. For production-ready versions of this code and many other types of infrastructure, check out Gruntwork.
WARNING: The Terraform modules and their automated tests deploy real resources into your AWS account which can cost you money. The resources are all part of the AWS Free Tier, so if you haven't used that up, it should be free, but you are completely responsible for all AWS charges.
- Sign up for AWS.
- Configure your AWS credentials using one of the supported methods for AWS CLI
tools,
such as setting the
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables. - Install Terraform and make sure it's on your
PATH
. - Install Golang, minimum version
1.13
. cd test
- To run a single test:
go test -v -timeout 15m -run <TEST_NAME>
- Install Docker.
- Install Golang, minimum version
1.13
. - You'll need access to a Kubernetes cluster to run these tests. Recommended option: If you're using the Docker Desktop app, then you already have a local Kubernetes cluster installed! Alternatively, you can run Kubernetes locally using MiniKube or run these tests against a Kubernetes cluster in the cloud, such as Amazon EKS, Google Container Engine, or Azure Kubernetes Service.
- Whichever option you choose to run your Kubernetes cluster, you'll need to authentiate to it. If you're running Kubernetes locally (e.g., via Docker for Desktop), you're probably already authenticated to it, so there's nothing to do.
cd test
- To run a single test:
go test -v -timeout 15m -run <TEST_NAME>