Browse the Repo

file-type-icon.circleci
file-type-iconexamples
file-type-iconmodules
file-type-icontest
file-type-iconcharts
file-type-iconvalidation
file-type-iconREADME.md
file-type-icongke_basic_helm_test.go
file-type-icongke_cluster_test.go
file-type-icongo.mod
file-type-icongo.sum
file-type-iconterratest_options.go
file-type-icontest_helpers.go
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconCONTRIBUTING.md
file-type-iconGRUNTWORK_PHILOSOPHY.md
file-type-iconLICENSE
file-type-iconNOTICE
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvariables.tf

Browse the Repo

file-type-icon.circleci
file-type-iconexamples
file-type-iconmodules
file-type-icontest
file-type-iconcharts
file-type-iconvalidation
file-type-iconREADME.md
file-type-icongke_basic_helm_test.go
file-type-icongke_cluster_test.go
file-type-icongo.mod
file-type-icongo.sum
file-type-iconterratest_options.go
file-type-icontest_helpers.go
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconCONTRIBUTING.md
file-type-iconGRUNTWORK_PHILOSOPHY.md
file-type-iconLICENSE
file-type-iconNOTICE
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvariables.tf
Google Kubernetes Engine (GKE) Cluster

Google Kubernetes Engine (GKE) Cluster

Deploy a Kubernetes cluster on top of Google Kubernetes Engine (GKE).

Code Preview

Preview the Code

mobile file icon

README.md

down

Tests

This folder contains automated tests for this Module. All of the tests are written in Go. Most of these are "integration tests" that deploy real infrastructure using Terraform and verify that infrastructure works as expected using a helper library called Terratest.

WARNING: These Tests May Cost You Money!

Note #1: Many of these tests create real resources in a GCP account and then try to clean those resources up at the end of a test run. That means these tests may cost you money to run! When adding tests, please be considerate of the resources you create and take extra care to clean everything up when you're done!

Note #2: Never forcefully shut the tests down (e.g. by hitting CTRL + C) or the cleanup tasks won't run!

Note #3: We set -timeout 60m on all tests not because they necessarily take that long, but because Go has a default test timeout of 10 minutes, after which it forcefully kills the tests with a SIGQUIT, preventing the cleanup tasks from running. Therefore, we set an overlying long timeout to make sure all tests have enough time to finish and clean up.

Running the tests

Prerequisites

One-time setup

Download Go dependencies:

cd test
go mod download

Run all the tests

cd test
go test -v -timeout 60m

Run a specific test

To run a specific test called TestFoo:

cd test
go test -v -timeout 60m -run TestFoo

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?