Skip to content

Commit

Permalink
Increase wait timeout for creating helm clusters
Browse files Browse the repository at this point in the history
The default wait timeout was 5 min, so this changes the timeout and
waits until the k8s resources are in a ready state. This could be
helpful in environments like AKS where volumes take a long time to
mount.

This commit uses a fork of terratest for the ExtraArgs functionality.
  • Loading branch information
ndhanushkodi committed Dec 14, 2020
1 parent d13bd9e commit 84c0c22
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions test/acceptance/framework/consul/consul_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,18 @@ func NewHelmCluster(

logger := terratestLogger.New(logger.TestLogger{})

// Wait up to 15 min for K8s resources to be in a ready state. Increasing
// this from the default of 5 min could help with flakiness in environments
// like AKS where volumes take a long time to mount.
extraArgs := map[string][]string{
"install": {"--timeout", "15m"},
}

opts := &helm.Options{
SetValues: values,
KubectlOptions: ctx.KubectlOptions(t),
Logger: logger,
ExtraArgs: extraArgs,
}
return &HelmCluster{
ctx: ctx,
Expand Down
2 changes: 2 additions & 0 deletions test/acceptance/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ require (
k8s.io/apimachinery v0.19.3
k8s.io/client-go v0.19.3
)

replace github.com/gruntwork-io/terratest => github.com/ndhanushkodi/terratest v0.31.1-0.20201209054802-bd90ebf8ddad
4 changes: 2 additions & 2 deletions test/acceptance/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/gruntwork-io/gruntwork-cli v0.7.0 h1:YgSAmfCj9c61H+zuvHwKfYUwlMhu5arnQQLM4RH+CYs=
github.com/gruntwork-io/gruntwork-cli v0.7.0/go.mod h1:jp6Z7NcLF2avpY8v71fBx6hds9eOFPELSuD/VPv7w00=
github.com/gruntwork-io/terratest v0.31.0 h1:0KZvzXixjgah2U6MXSiZvNEVLzHOOTeBraOElFW4OrU=
github.com/gruntwork-io/terratest v0.31.0/go.mod h1:EEgJie28gX/4AD71IFqgMj6e99KP5mi81hEtzmDjxTo=
github.com/hashicorp/consul/api v1.4.1-0.20201015173526-812fe06d6c64 h1:8/zXC/mxIXKRqcRACIu/G016QKE/XWWBXsuNnJO3O9s=
github.com/hashicorp/consul/api v1.4.1-0.20201015173526-812fe06d6c64/go.mod h1:duA0cMzNQkvdlj8Ayz6LmyaMUta7iVW8qY2w2bic/Iw=
github.com/hashicorp/consul/sdk v0.6.0 h1:FfhMEkwvQl57CildXJyGHnwGGM4HMODGyfjGwNM1Vdw=
Expand Down Expand Up @@ -367,6 +365,8 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/ndhanushkodi/terratest v0.31.1-0.20201209054802-bd90ebf8ddad h1:5x3lvwx1mi9rUwrUCgWdftVODTdschQR0pQR2YYx26g=
github.com/ndhanushkodi/terratest v0.31.1-0.20201209054802-bd90ebf8ddad/go.mod h1:EEgJie28gX/4AD71IFqgMj6e99KP5mi81hEtzmDjxTo=
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down

0 comments on commit 84c0c22

Please sign in to comment.