Skip to content

Commit 94cc0f7

Browse files
committed
tests/int: Ensure infra env is stopped at the end
Update tftestenv with signal handling for graceful terraform shutdown. Move the environment stop into a defer block to ensure that the environment is always stopped at the end if -retain is not configured. This will make sure that the environment is deleted in case any program crashed, especially in CI environments. Also, update the go dependencies. Signed-off-by: Sunny <[email protected]>
1 parent 9b48346 commit 94cc0f7

File tree

3 files changed

+147
-102
lines changed

3 files changed

+147
-102
lines changed

tests/integration/go.mod

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ replace github.com/fluxcd/image-reflector-controller/api => ../../api
66

77
require (
88
github.com/fluxcd/image-reflector-controller/api v0.0.0
9-
github.com/fluxcd/test-infra/tftestenv v0.0.0-20230214200258-f19d6aa97a3f
9+
github.com/fluxcd/test-infra/tftestenv v0.0.0-20230530120643-bdcf7573fb2f
1010
github.com/hashicorp/terraform-json v0.15.0
11-
github.com/onsi/gomega v1.27.2
12-
k8s.io/apimachinery v0.26.3
11+
github.com/onsi/gomega v1.27.7
12+
k8s.io/apimachinery v0.27.2
1313
)
1414

1515
require (
16+
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
1617
github.com/containerd/stargz-snapshotter/estargz v0.12.0 // indirect
1718
github.com/davecgh/go-spew v1.1.1 // indirect
1819
github.com/docker/cli v20.10.17+incompatible // indirect
@@ -22,28 +23,29 @@ require (
2223
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
2324
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
2425
github.com/fluxcd/pkg/apis/acl v0.1.0 // indirect
25-
github.com/fluxcd/pkg/apis/meta v1.0.0 // indirect
26+
github.com/fluxcd/pkg/apis/meta v1.1.0 // indirect
2627
github.com/go-logr/logr v1.2.4 // indirect
27-
github.com/go-openapi/jsonpointer v0.19.5 // indirect
28-
github.com/go-openapi/jsonreference v0.20.0 // indirect
29-
github.com/go-openapi/swag v0.19.14 // indirect
28+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
29+
github.com/go-openapi/jsonreference v0.20.1 // indirect
30+
github.com/go-openapi/swag v0.22.3 // indirect
3031
github.com/gogo/protobuf v1.3.2 // indirect
31-
github.com/golang/protobuf v1.5.2 // indirect
32+
github.com/golang/protobuf v1.5.3 // indirect
3233
github.com/google/gnostic v0.5.7-v3refs // indirect
3334
github.com/google/go-cmp v0.5.9 // indirect
3435
github.com/google/go-containerregistry v0.11.0 // indirect
3536
github.com/google/gofuzz v1.2.0 // indirect
37+
github.com/google/uuid v1.3.0 // indirect
3638
github.com/hashicorp/errwrap v1.0.0 // indirect
3739
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
3840
github.com/hashicorp/go-multierror v1.1.1 // indirect
3941
github.com/hashicorp/go-version v1.6.0 // indirect
40-
github.com/hashicorp/hc-install v0.3.2 // indirect
41-
github.com/hashicorp/terraform-exec v0.16.1 // indirect
42+
github.com/hashicorp/hc-install v0.5.0 // indirect
43+
github.com/hashicorp/terraform-exec v0.18.1 // indirect
4244
github.com/imdario/mergo v0.3.12 // indirect
4345
github.com/josharian/intern v1.0.0 // indirect
4446
github.com/json-iterator/go v1.1.12 // indirect
4547
github.com/klauspost/compress v1.15.8 // indirect
46-
github.com/mailru/easyjson v0.7.6 // indirect
48+
github.com/mailru/easyjson v0.7.7 // indirect
4749
github.com/mitchellh/go-homedir v1.1.0 // indirect
4850
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4951
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -54,26 +56,27 @@ require (
5456
github.com/sirupsen/logrus v1.9.0 // indirect
5557
github.com/spf13/pflag v1.0.5 // indirect
5658
github.com/vbatts/tar-split v0.11.2 // indirect
57-
github.com/zclconf/go-cty v1.10.0 // indirect
58-
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
59-
golang.org/x/net v0.8.0 // indirect
60-
golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92 // indirect
61-
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect
62-
golang.org/x/sys v0.6.0 // indirect
63-
golang.org/x/term v0.6.0 // indirect
64-
golang.org/x/text v0.8.0 // indirect
59+
github.com/zclconf/go-cty v1.13.0 // indirect
60+
golang.org/x/crypto v0.5.0 // indirect
61+
golang.org/x/mod v0.8.0 // indirect
62+
golang.org/x/net v0.10.0 // indirect
63+
golang.org/x/oauth2 v0.5.0 // indirect
64+
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
65+
golang.org/x/sys v0.8.0 // indirect
66+
golang.org/x/term v0.8.0 // indirect
67+
golang.org/x/text v0.9.0 // indirect
6568
golang.org/x/time v0.3.0 // indirect
6669
google.golang.org/appengine v1.6.7 // indirect
67-
google.golang.org/protobuf v1.28.1 // indirect
70+
google.golang.org/protobuf v1.30.0 // indirect
6871
gopkg.in/inf.v0 v0.9.1 // indirect
6972
gopkg.in/yaml.v2 v2.4.0 // indirect
7073
gopkg.in/yaml.v3 v3.0.1 // indirect
71-
k8s.io/api v0.26.3 // indirect
72-
k8s.io/client-go v0.26.1 // indirect
73-
k8s.io/klog/v2 v2.90.1 // indirect
74-
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
75-
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect
76-
sigs.k8s.io/controller-runtime v0.14.6 // indirect
74+
k8s.io/api v0.27.2 // indirect
75+
k8s.io/client-go v0.27.2 // indirect
76+
k8s.io/klog/v2 v2.100.1 // indirect
77+
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
78+
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
79+
sigs.k8s.io/controller-runtime v0.15.0 // indirect
7780
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
7881
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
7982
sigs.k8s.io/yaml v1.3.0 // indirect

0 commit comments

Comments
 (0)