Repository: kubernetes-sigs/cluster-api
Pull request #2799 (2020-03-27 11:05:00)

🏃 tests: move NewWithT(t) to inside the t.Run where applicable
**What this PR does / why we need it**:
move NewWithT(t) to inside the t.Run where applicable

/kind cleanup

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
 - Fixes https://github.com/kubernetes-sigs/cluster-api/issues/2798


cc @wfernandes @fabriziopandini 

k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/cluster-api/pull/2799#" title="Author self-approved">cpanato</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **neolit123**
You can assign the PR to them by writing `/assign @neolit123` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fcluster-api).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-sigs/cluster-api/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["neolit123"]} -->
k8s-ci-robot: @cpanato: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-cluster-api-make | 59036db514f2fdb324066d2187b22c5bbed75acc | [link](https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api/2799/pull-cluster-api-make/1243494305977339904) | `/test pull-cluster-api-make`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cluster-api&pr=2799). [Your PR dashboard](https://gubernator.k8s.io/pr/cpanato). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cluster-api/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @cpanato: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-cluster-api-make | 59036db514f2fdb324066d2187b22c5bbed75acc | [link](https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api/2799/pull-cluster-api-make/1243494305977339904) | `/test pull-cluster-api-make`
pull-cluster-api-test | 59036db514f2fdb324066d2187b22c5bbed75acc | [link](https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api/2799/pull-cluster-api-test/1243494305977339909) | `/test pull-cluster-api-test`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cluster-api&pr=2799). [Your PR dashboard](https://gubernator.k8s.io/pr/cpanato). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cluster-api/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
neolit123: /approve
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/cluster-api/pull/2799#" title="Author self-approved">cpanato</a>*, *<a href="https://github.com/kubernetes-sigs/cluster-api/pull/2799#issuecomment-605037942" title="Approved">neolit123</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fcluster-api).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/cluster-api/blob/master/OWNERS)~~ [neolit123]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
index 28a6851a0..f28d045a5 100644
--- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
+++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: kubeadmconfigs.bootstrap.cluster.x-k8s.io
 spec:
diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
index 9d0448ac8..3dcc64dcc 100644
--- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
+++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io
 spec:
diff --git a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
index 5d6554aa9..a5fbb1dd3 100644
--- a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
+++ b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: metadata.clusterctl.cluster.x-k8s.io
 spec:
diff --git a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
index fe66e3f3b..e5b6ac2e6 100644
--- a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
+++ b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: providers.clusterctl.cluster.x-k8s.io
 spec:
diff --git a/cmd/clusterctl/config/zz_generated.bindata.go b/cmd/clusterctl/config/zz_generated.bindata.go
index 341895b76..c18424013 100644
--- a/cmd/clusterctl/config/zz_generated.bindata.go
+++ b/cmd/clusterctl/config/zz_generated.bindata.go
@@ -114,7 +114,7 @@ func cmdClusterctlConfigManifestCertManagerYaml() (*asset, error) {
 	return a, nil
 }
 
-var _cmdClusterctlConfigManifestClusterctlApiYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x56\x3d\x93\xdb\x36\x13\xee\xf5\x2b\x76\xfc\x16\x6e\x5e\x51\x71\xdc\x78\xd8\x65\x2e\x29\x3c\xf9\x18\x8d\xef\xe6\x5c\x64\x52\x40\xc0\x8a\x84\x0f\x5c\x20\xd8\x85\x6c\x25\x93\xff\x9e\x01\x40\x52\xa4\xce\x51\xae\x09\x2b\x61\xb9\x1f\x8f\x9e\xdd\x7d\x08\x15\xec\x23\x46\xb6\x9e\x5a\x50\xc1\xe2\x17\x41\xca\x27\x6e\x9e\xde\x71\x63\xfd\xee\xf4\x66\xf3\x64\xc9\xb4\x70\x97\x58\xfc\xf0\x01\xd9\xa7\xa8\xf1\x7b\x3c\x5a\xb2\x62\x3d\x6d\x06\x14\x65\x94\xa8\x76\x03\xa0\x88\xbc\xa8\x6c\xe6\x7c\x04\xd0\x9e\x24\x7a\xe7\x30\x6e\x3b\xa4\xe6\x29\x1d\xf0\x90\xac\x33\x18\x4b\xf2\xa9\xf4\xe9\x9b\xe6\xdb\xe6\xdd\x06\x40\x47\x2c\xe1\x0f\x76\x40\x16\x35\x84\x16\x28\x39\xb7\x01\x20\x35\x60\x0b\x21\xfa\x93\x35\x18\xb9\xd1\x2e\xb1\x60\xd4\xe2\xa6\x9f\xcd\x97\x6d\x05\xbd\xe1\x80\x3a\xd7\xef\xa2\x4f\xa1\x85\x5b\xae\x35\xf1\x84\x56\x09\x76\x3e\xda\xe9\xbc\x9d\x42\xb7\x2a\xd8\x62\xa9\x5c\xec\x47\x14\xc5\xe4\x2c\xcb\x8f\x2b\xf3\x4f\x96\xa5\xbc\x0a\x2e\x45\xe5\x16\xa8\x8b\x95\x2d\x75\xc9\xa9\x78\xb1\x6f\x00\x58\xfb\x80\x2d\xfc\x92\xc1\x04\xa5\xd1\x6c\x00\x46\x7a\x0a\x98\x2d\x28\x63\x0a\xe1\xca\xed\xa3\x25\xc1\x78\xe7\x5d\x1a\x68\x86\xfa\x89\x3d\xed\x95\xf4\x2d\x34\x61\x89\x6f\xa2\xee\xe1\x1c\x70\x34\xc8\x39\xd7\x62\x89\x96\xba\xe7\xd1\x72\x71\xac\x91\xfb\x75\xba\xdb\xd1\x23\xe8\x55\x82\xc7\x95\xed\x76\xfc\x67\x25\xba\x47\x33\x13\xb1\x4a\xf4\x31\xbf\x84\xeb\x77\xcf\x12\x56\xe7\xd3\x1b\xe5\x42\xaf\xde\x56\xd2\x75\x8f\x83\x6a\xc7\x08\x1f\x90\xbe\xdb\xbf\x7f\x7c\x7b\xbf\x32\x03\x18\x64\x1d\x6d\x90\x32\x95\xd3\xff\x06\x93\xa7\x1d\x19\x14\x01\x92\xc4\x33\x58\x02\xe9\x71\xee\x1f\x58\x3a\x21\x89\x8f\xe7\x66\xce\x14\xa2\x0f\x18\x65\x9e\xa5\xfa\x2c\xf6\x6d\x61\xbd\xaa\xfb\x3a\x43\xab\x5e\x73\xe9\x5c\x6e\xa4\x16\xcd\xf8\x6f\xc0\x1f\x41\x7a\xcb\x10\x31\x44\x64\xa4\xba\x7a\xab\xc4\x90\x9d\x14\x81\x3f\x7c\x42\x2d\x0d\xdc\x63\xcc\x69\x80\x7b\x9f\x9c\xc9\xfb\x79\xc2\x28\x10\x51\xfb\x8e\xec\x1f\x73\x6e\x06\xf1\xa5\xa8\x53\x82\xe3\x38\x5f\x9e\x32\x7f\xa4\x1c\x9c\x94\x4b\xf8\x7f\x50\x64\x60\x50\x67\x88\x98\xab\x40\xa2\x45\xbe\xe2\xc2\x0d\xfc\xec\x23\x82\xa5\xa3\x6f\xa1\x17\x09\xdc\xee\x76\x9d\x95\x49\x67\xb4\x1f\x86\x44\x56\xce\xbb\x22\x19\xf6\x90\xc4\x47\xde\x19\x3c\xa1\xdb\xb1\xed\xb6\x2a\xea\xde\x0a\x6a\x49\x11\x77\x2a\xd8\x6d\x81\x4e\x45\x6b\x9a\xc1\xfc\x2f\x8e\xca\xc4\xaf\x57\x58\x9f\xcd\x46\x7d\xca\x1e\xdf\xe8\x40\x5e\x68\xb0\x0c\x6a\x0c\xad\xff\xe2\x42\x74\x36\x65\x76\x3e\xfc\x70\xff\x00\x53\xe9\xd2\x8c\x6b\xf6\x0b\xef\x97\x40\xbe\xb4\x20\x13\x66\xe9\x88\xb1\x36\xf1\x18\xfd\x50\x72\x22\x99\xe0\x2d\x49\x39\x68\x67\x91\xae\xe9\xe7\x74\x18\xac\xe4\xbe\xff\x9e\x90\x25\xf7\xaa\x81\xbb\x22\xbe\x70\x40\x48\xc1\x28\x41\xd3\xc0\x7b\x82\x3b\x35\xa0\xbb\x53\x8c\xff\x79\x03\x32\xd3\xbc\xcd\xc4\xbe\xac\x05\xcb\xef\xc6\xb5\x73\x65\x6d\xf1\x62\xda\xb4\xbc\xfa\x37\xfa\xb6\x5f\xb8\x81\x25\x63\xb3\xa2\xd7\xe5\xc9\x9a\x50\x17\xe6\xb2\xb7\xcd\x4b\x70\x16\xf3\x3f\x97\xcc\xb2\x7a\x55\x2a\x47\x3c\x2b\x05\xf7\x88\x33\xbe\x85\x16\x4f\xcf\xd1\x47\x50\xe5\x63\x92\x43\x39\x85\xe0\xa3\xcc\xeb\xf3\x12\xa0\xa7\x7f\x15\x96\x49\x54\xd6\x70\xb5\x1f\x82\x27\x24\x99\x32\xbc\x88\x96\x6b\x9d\xbe\x51\xf6\xe3\x95\xeb\x57\x3a\x53\xed\x9f\x7b\x8c\xb8\xa2\xed\x8a\xa4\xcb\x75\x22\x2f\xa7\xe5\x8a\xc2\x52\xd7\x80\x3d\x02\x0e\x41\xce\x6b\x61\x5e\x07\x4c\xde\x5f\xa1\xbe\x4e\x1c\x67\x65\x57\xce\x5d\x30\xf1\x0b\xc8\x78\x36\xb3\x9c\x37\xdc\xb4\x20\x31\xd5\x36\xb3\xf8\xa8\x3a\x5c\x5a\xd2\x61\x56\xac\x16\xfe\xfc\x6b\xc3\xa2\x24\x95\x6f\x85\xd2\x1a\x83\x8c\x7c\xb5\x8b\x6b\xc7\xab\x57\xab\x5b\x45\x39\x6a\x4f\xf5\x5a\xc0\x2d\xfc\xfa\xdb\xa6\x96\x42\xf3\x38\x5d\x1d\xb2\xf1\xef\x00\x00\x00\xff\xff\x75\xfc\x11\xdc\xe5\x09\x00\x00")
+var _cmdClusterctlConfigManifestClusterctlApiYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x56\x4d\x8f\xdb\x36\x13\xbe\xfb\x57\x0c\xf2\x1e\x72\x79\x2d\x37\x0d\x50\x14\xba\x15\xdb\x1e\x82\x7e\xc0\xc8\x2e\x36\x87\xa2\x07\x9a\x1c\x4b\xcc\x52\x43\x96\x33\x74\xe2\x16\xfd\xef\x05\x49\x49\x96\xbc\xa9\xbb\x97\xea\x64\x8e\xe6\xe3\xf1\x33\x33\x8f\xa8\x82\x7d\xc4\xc8\xd6\x53\x0b\x2a\x58\xfc\x2c\x48\xf9\xc4\xcd\xd3\xb7\xdc\x58\xbf\x3b\xbd\xd9\x3c\x59\x32\x2d\xdc\x25\x16\x3f\xbc\x47\xf6\x29\x6a\xfc\x1e\x8f\x96\xac\x58\x4f\x9b\x01\x45\x19\x25\xaa\xdd\x00\x28\x22\x2f\x2a\x9b\x39\x1f\x01\xb4\x27\x89\xde\x39\x8c\xdb\x0e\xa9\x79\x4a\x07\x3c\x24\xeb\x0c\xc6\x92\x7c\x2a\x7d\xfa\xaa\xf9\xba\xf9\x66\x03\xa0\x23\x96\xf0\x07\x3b\x20\x8b\x1a\x42\x0b\x94\x9c\xdb\x00\x90\x1a\xb0\x85\x10\xfd\xc9\x1a\x8c\xdc\x68\x97\x58\x30\x6a\x71\xd3\xcf\xe6\xf3\xb6\x82\xde\x70\x40\x9d\xeb\x77\xd1\xa7\xd0\xc2\x2d\xd7\x9a\x78\x42\xab\x04\x3b\x1f\xed\x74\xde\x4e\xa1\x5b\x15\x6c\xb1\x54\x2e\xf6\x23\x8a\x62\x72\x96\xe5\xc7\x95\xf9\x27\xcb\x52\x5e\x05\x97\xa2\x72\x0b\xd4\xc5\xca\x96\xba\xe4\x54\xbc\xd8\x37\x00\xac\x7d\xc0\x16\x7e\xc9\x60\x82\xd2\x68\x36\x00\x23\x3d\x05\xcc\x16\x94\x31\x85\x70\xe5\xf6\xd1\x92\x60\xbc\xf3\x2e\x0d\x34\x43\xfd\xc8\x9e\xf6\x4a\xfa\x16\x9a\xb0\xc4\x37\x51\xf7\x70\x0e\x38\x1a\xe4\x9c\x6b\xb1\x44\x4b\xdd\xf3\x68\xb9\x38\xd6\xc8\xfd\x3a\xdd\xed\xe8\x11\xf4\x2a\xc1\xe3\xca\x76\x3b\xfe\x93\x12\xdd\xa3\x99\x89\x58\x25\xfa\x90\x5f\xc2\xf5\xbb\x67\x09\xab\xf3\xe9\x8d\x72\xa1\x57\x6f\x2b\xe9\xba\xc7\x41\xb5\x63\x84\x0f\x48\xdf\xed\xdf\x3d\xbe\xbd\x5f\x99\x01\x0c\xb2\x8e\x36\x48\x99\xca\xe9\x7f\x83\xc9\xd3\x8e\x0c\x8a\x00\x49\xe2\x19\x2c\x81\xf4\x38\xf7\x0f\x2c\x9d\x90\xc4\xc7\x73\x33\x67\x0a\xd1\x07\x8c\x32\xcf\x52\x7d\x16\xfb\xb6\xb0\x5e\xd5\x7d\x9d\xa1\x55\xaf\xb9\x74\x2e\x37\x52\x8b\x66\xfc\x37\xe0\x8f\x20\xbd\x65\x88\x18\x22\x32\x52\x5d\xbd\x55\x62\xc8\x4e\x8a\xc0\x1f\x3e\xa2\x96\x06\xee\x31\xe6\x34\xc0\xbd\x4f\xce\xe4\xfd\x3c\x61\x14\x88\xa8\x7d\x47\xf6\x8f\x39\x37\x83\xf8\x52\xd4\x29\xc1\x71\x9c\x2f\x4f\x99\x3f\x52\x0e\x4e\xca\x25\xfc\x3f\x28\x32\x30\xa8\x33\x44\xcc\x55\x20\xd1\x22\x5f\x71\xe1\x06\x7e\xf6\x11\xc1\xd2\xd1\xb7\xd0\x8b\x04\x6e\x77\xbb\xce\xca\xa4\x33\xda\x0f\x43\x22\x2b\xe7\x5d\x91\x0c\x7b\x48\xe2\x23\xef\x0c\x9e\xd0\xed\xd8\x76\x5b\x15\x75\x6f\x05\xb5\xa4\x88\x3b\x15\xec\xb6\x40\xa7\xa2\x35\xcd\x60\xfe\x17\x47\x65\xe2\xd7\x2b\xac\xcf\x66\xa3\x3e\x65\x8f\x6f\x74\x20\x2f\x34\x58\x06\x35\x86\xd6\x7f\x71\x21\x3a\x9b\x32\x3b\xef\x7f\xb8\x7f\x80\xa9\x74\x69\xc6\x35\xfb\x85\xf7\x4b\x20\x5f\x5a\x90\x09\xb3\x74\xc4\x58\x9b\x78\x8c\x7e\x28\x39\x91\x4c\xf0\x96\xa4\x1c\xb4\xb3\x48\xd7\xf4\x73\x3a\x0c\x56\x72\xdf\x7f\x4f\xc8\x92\x7b\xd5\xc0\x5d\x11\x5f\x38\x20\xa4\x60\x94\xa0\x69\xe0\x1d\xc1\x9d\x1a\xd0\xdd\x29\xc6\xff\xbc\x01\x99\x69\xde\x66\x62\x5f\xd6\x82\xe5\x77\xe3\xda\xb9\xb2\xb6\x78\x31\x6d\x5a\x5e\xfd\x1b\x7d\xdb\x2f\xdc\xc0\x92\xb1\x59\xd1\xeb\xf2\x64\x4d\xa8\x0b\x73\xd9\xdb\xe6\x25\x38\x8b\xf9\x9f\x4b\x66\x59\xbd\x2a\x95\x23\x9e\x95\x82\x7b\xc4\x19\xdf\x42\x8b\xa7\xe7\xe8\x23\xa8\xf2\x31\xc9\xa1\x9c\x42\xf0\x51\xe6\xf5\x79\x09\xd0\xd3\xbf\x0a\xcb\x24\x2a\x6b\xb8\xda\x0f\xc1\x13\x92\x4c\x19\x5e\x44\xcb\xb5\x4e\xdf\x28\xfb\xe1\xca\xf5\x0b\x9d\xa9\xf6\x4f\x3d\x46\x5c\xd1\x76\x45\xd2\xe5\x3a\x91\x97\xd3\x72\x45\x61\xa9\x6b\xc0\x1e\x01\x87\x20\xe7\xb5\x30\xaf\x03\x26\xef\x2f\x50\x5f\x27\x8e\xb3\xb2\x2b\xe7\x2e\x98\xf8\x05\x64\x3c\x9b\x59\xce\x1b\x6e\x5a\x90\x98\x6a\x9b\x59\x7c\x54\x1d\x2e\x2d\xe9\x30\x2b\x56\x0b\x7f\xfe\xb5\x61\x51\x92\xca\xb7\x42\x69\x8d\x41\x46\xbe\xda\xc5\xb5\xe3\xd5\xab\xd5\xad\xa2\x1c\xb5\xa7\x7a\x2d\xe0\x16\x7e\xfd\x6d\x53\x4b\xa1\x79\x9c\xae\x0e\xd9\xf8\x77\x00\x00\x00\xff\xff\xa0\x8f\x34\x39\xe5\x09\x00\x00")
 
 func cmdClusterctlConfigManifestClusterctlApiYamlBytes() ([]byte, error) {
 	return bindataRead(
diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml
index c9512218f..90f023311 100644
--- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: clusters.cluster.x-k8s.io
 spec:
diff --git a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
index 69c6d8d67..a7d9d0072 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: machinedeployments.cluster.x-k8s.io
 spec:
diff --git a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
index 86649ee7c..1130b1236 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: machinehealthchecks.cluster.x-k8s.io
 spec:
diff --git a/config/crd/bases/cluster.x-k8s.io_machines.yaml b/config/crd/bases/cluster.x-k8s.io_machines.yaml
index a5466dd3c..2750dd596 100644
--- a/config/crd/bases/cluster.x-k8s.io_machines.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machines.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: machines.cluster.x-k8s.io
 spec:
diff --git a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
index 569eff13e..c42220711 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: machinesets.cluster.x-k8s.io
 spec:
diff --git a/config/crd/bases/exp.cluster.x-k8s.io_machinepools.yaml b/config/crd/bases/exp.cluster.x-k8s.io_machinepools.yaml
index 573d4c9c4..6b67d07f9 100644
--- a/config/crd/bases/exp.cluster.x-k8s.io_machinepools.yaml
+++ b/config/crd/bases/exp.cluster.x-k8s.io_machinepools.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: machinepools.exp.cluster.x-k8s.io
 spec:
diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
index 19f1b92ea..6ce27516b 100644
--- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
+++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: kubeadmcontrolplanes.controlplane.cluster.x-k8s.io
 spec:
diff --git a/go.mod b/go.mod
index ef1410818..4497325ab 100644
--- a/go.mod
+++ b/go.mod
@@ -41,7 +41,7 @@ require (
 	k8s.io/component-base v0.17.2
 	k8s.io/klog v1.0.0
 	k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab
-	sigs.k8s.io/controller-runtime v0.5.2
+	sigs.k8s.io/controller-runtime v0.5.1
 	sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802
 	sigs.k8s.io/yaml v1.2.0
 )
diff --git a/go.sum b/go.sum
index 6ae6dcc65..aa9e2f60e 100644
--- a/go.sum
+++ b/go.sum
@@ -627,8 +627,8 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
 modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
 modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
 modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
-sigs.k8s.io/controller-runtime v0.5.2 h1:pyXbUfoTo+HA3jeIfr0vgi+1WtmNh0CwlcnQGLXwsSw=
-sigs.k8s.io/controller-runtime v0.5.2/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A=
+sigs.k8s.io/controller-runtime v0.5.1 h1:TNidCfVoU/cs2i+9xoTcL/l7yhl0bDhYXU0NCG6wmiE=
+sigs.k8s.io/controller-runtime v0.5.1/go.mod h1:Uojny7gvg55YLQnEGnPzRE3dC4ik2tRlZJgOUCWXAV4=
 sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802 h1:L6/8hETA7jvdx3xBcbDifrIN2xaYHE7tA58n+Kdp2Zw=
 sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802/go.mod h1:HIZ3PWUezpklcjkqpFbnYOqaqsAE1JeCTEwkgvPLXjk=
 sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
diff --git a/hack/tools/go.mod b/hack/tools/go.mod
index 74d1c7400..90426d05d 100644
--- a/hack/tools/go.mod
+++ b/hack/tools/go.mod
@@ -9,7 +9,7 @@ require (
 	github.com/raviqqe/liche v0.0.0-20200229003944-f57a5d1c5be4
 	golang.org/x/tools v0.0.0-20200204192400-7124308813f3
 	k8s.io/code-generator v0.18.0-alpha.2.0.20200130061103-7dfd5e9157ef
-	sigs.k8s.io/controller-tools v0.2.8
+	sigs.k8s.io/controller-tools v0.2.6
 	sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20200226075303-ed8438ec10a4
 	sigs.k8s.io/kustomize/kustomize/v3 v3.5.4
 	sigs.k8s.io/testing_frameworks v0.1.2
diff --git a/hack/tools/go.sum b/hack/tools/go.sum
index 1b2a03c71..aa6dc15c3 100644
--- a/hack/tools/go.sum
+++ b/hack/tools/go.sum
@@ -779,8 +779,8 @@ mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphD
 mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
 mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4=
 mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
-sigs.k8s.io/controller-tools v0.2.8 h1:UmYsnu89dn8/wBhjKL3lkGyaDGRnPDYUx2+iwXRnylA=
-sigs.k8s.io/controller-tools v0.2.8/go.mod h1:9VKHPszmf2DHz/QmHkcfZoewO6BL7pPs9uAiBVsaJSE=
+sigs.k8s.io/controller-tools v0.2.6 h1:4Fo36alFw5+Fffz7HhNd2EFBFvckqVkb4ePnIj0uLUc=
+sigs.k8s.io/controller-tools v0.2.6/go.mod h1:9VKHPszmf2DHz/QmHkcfZoewO6BL7pPs9uAiBVsaJSE=
 sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20200226075303-ed8438ec10a4 h1:P/Vxe8zHHI0mjkl9+5UuWJgynJgLxoVpisfWKWr3zl4=
 sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20200226075303-ed8438ec10a4/go.mod h1:nyAxPBUS04gN3IRuEQ0elG4mVeto/d/qQRsW2PsyAy4=
 sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=


Test patch:
diff --git a/api/v1alpha2/conversion_test.go b/api/v1alpha2/conversion_test.go
index 2780d0f15..cb9cf5818 100644
--- a/api/v1alpha2/conversion_test.go
+++ b/api/v1alpha2/conversion_test.go
@@ -42,10 +42,10 @@ func TestFuzzyConversion(t *testing.T) {
 }
 
 func TestConvertCluster(t *testing.T) {
-	g := NewWithT(t)
-
 	t.Run("to hub", func(t *testing.T) {
 		t.Run("should convert the first value in Status.APIEndpoints to Spec.ControlPlaneEndpoint", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &Cluster{
 				Status: ClusterStatus{
 					APIEndpoints: []APIEndpoint{
@@ -66,6 +66,8 @@ func TestConvertCluster(t *testing.T) {
 
 	t.Run("from hub", func(t *testing.T) {
 		t.Run("preserves fields from hub version", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &v1alpha3.Cluster{
 				ObjectMeta: metav1.ObjectMeta{
 					Name: "hub",
@@ -92,6 +94,8 @@ func TestConvertCluster(t *testing.T) {
 		})
 
 		t.Run("should convert Spec.ControlPlaneEndpoint to Status.APIEndpoints[0]", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &v1alpha3.Cluster{
 				Spec: v1alpha3.ClusterSpec{
 					ControlPlaneEndpoint: v1alpha3.APIEndpoint{
@@ -110,10 +114,10 @@ func TestConvertCluster(t *testing.T) {
 }
 
 func TestConvertMachine(t *testing.T) {
-	g := NewWithT(t)
-
 	t.Run("to hub", func(t *testing.T) {
 		t.Run("should convert the Spec.ClusterName from label", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &Machine{
 				ObjectMeta: metav1.ObjectMeta{
 					Labels: map[string]string{
@@ -130,6 +134,8 @@ func TestConvertMachine(t *testing.T) {
 
 	t.Run("from hub", func(t *testing.T) {
 		t.Run("preserves fields from hub version", func(t *testing.T) {
+			g := NewWithT(t)
+
 			failureDomain := "my failure domain"
 			src := &v1alpha3.Machine{
 				ObjectMeta: metav1.ObjectMeta{
@@ -159,10 +165,10 @@ func TestConvertMachine(t *testing.T) {
 }
 
 func TestConvertMachineSet(t *testing.T) {
-	g := NewWithT(t)
-
 	t.Run("to hub", func(t *testing.T) {
 		t.Run("should convert the Spec.ClusterName from label", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &MachineSet{
 				ObjectMeta: metav1.ObjectMeta{
 					Labels: map[string]string{
@@ -180,6 +186,8 @@ func TestConvertMachineSet(t *testing.T) {
 
 	t.Run("from hub", func(t *testing.T) {
 		t.Run("preserves field from hub version", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &v1alpha3.MachineSet{
 				ObjectMeta: metav1.ObjectMeta{
 					Name: "hub",
@@ -208,10 +216,10 @@ func TestConvertMachineSet(t *testing.T) {
 }
 
 func TestConvertMachineDeployment(t *testing.T) {
-	g := NewWithT(t)
-
 	t.Run("to hub", func(t *testing.T) {
 		t.Run("should convert the Spec.ClusterName from label", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &MachineDeployment{
 				ObjectMeta: metav1.ObjectMeta{
 					Labels: map[string]string{
@@ -227,6 +235,8 @@ func TestConvertMachineDeployment(t *testing.T) {
 		})
 
 		t.Run("should convert the annotations", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &MachineDeployment{
 				ObjectMeta: metav1.ObjectMeta{
 					Annotations: map[string]string{
@@ -249,6 +259,8 @@ func TestConvertMachineDeployment(t *testing.T) {
 
 	t.Run("from hub", func(t *testing.T) {
 		t.Run("preserves fields from hub version", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &v1alpha3.MachineDeployment{
 				ObjectMeta: metav1.ObjectMeta{
 					Name: "hub",
@@ -278,6 +290,8 @@ func TestConvertMachineDeployment(t *testing.T) {
 		})
 
 		t.Run("should convert the annotations", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &v1alpha3.MachineDeployment{
 				ObjectMeta: metav1.ObjectMeta{
 					Annotations: map[string]string{
diff --git a/bootstrap/kubeadm/api/v1alpha2/conversion_test.go b/bootstrap/kubeadm/api/v1alpha2/conversion_test.go
index a39e0b7b8..6e9c93837 100644
--- a/bootstrap/kubeadm/api/v1alpha2/conversion_test.go
+++ b/bootstrap/kubeadm/api/v1alpha2/conversion_test.go
@@ -27,10 +27,10 @@ import (
 )
 
 func TestConvertKubeadmConfig(t *testing.T) {
-	g := NewWithT(t)
-
 	t.Run("from hub", func(t *testing.T) {
 		t.Run("preserves fields from hub version", func(t *testing.T) {
+			g := NewWithT(t)
+
 			src := &v1alpha3.KubeadmConfig{
 				ObjectMeta: metav1.ObjectMeta{
 					Name: "hub",
@@ -52,6 +52,5 @@ func TestConvertKubeadmConfig(t *testing.T) {
 			g.Expect(restored.Status.Ready).To(Equal(src.Status.Ready))
 			g.Expect(restored.Status.DataSecretName).To(Equal(src.Status.DataSecretName))
 		})
-
 	})
 }
diff --git a/bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go b/bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go
index cb73ee53f..ef6767bb5 100644
--- a/bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go
+++ b/bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go
@@ -362,8 +362,6 @@ func TestKubeadmConfigReconciler_Reconcile_ReturnNilIfAssociatedClusterIsNotFoun
 
 // If the control plane isn't initialized then there is no cluster for either a worker or control plane node to join.
 func TestKubeadmConfigReconciler_Reconcile_RequeueJoiningNodesIfControlPlaneNotInitialized(t *testing.T) {
-	g := NewWithT(t)
-
 	cluster := newCluster("cluster")
 	cluster.Status.InfrastructureReady = true
 
@@ -409,6 +407,8 @@ func TestKubeadmConfigReconciler_Reconcile_RequeueJoiningNodesIfControlPlaneNotI
 	}
 	for _, tc := range testcases {
 		t.Run(tc.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			myclient := fake.NewFakeClientWithScheme(setupScheme(), tc.objects...)
 
 			k := &KubeadmConfigReconciler{
@@ -552,8 +552,6 @@ func TestKubeadmConfigReconciler_Reconcile_RequeueIfControlPlaneIsMissingAPIEndp
 }
 
 func TestReconcileIfJoinNodesAndControlPlaneIsReady(t *testing.T) {
-	g := NewWithT(t)
-
 	cluster := newCluster("cluster")
 	cluster.Status.InfrastructureReady = true
 	cluster.Status.ControlPlaneInitialized = true
@@ -596,6 +594,8 @@ func TestReconcileIfJoinNodesAndControlPlaneIsReady(t *testing.T) {
 	for _, rt := range useCases {
 		rt := rt // pin!
 		t.Run(rt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			config := rt.configBuilder(rt.machine, rt.configName)
 
 			objects := []runtime.Object{
@@ -638,8 +638,6 @@ func TestReconcileIfJoinNodesAndControlPlaneIsReady(t *testing.T) {
 }
 
 func TestReconcileIfJoinNodePoolsAndControlPlaneIsReady(t *testing.T) {
-	g := NewWithT(t)
-
 	_ = feature.MutableGates.Set("MachinePool=true")
 
 	cluster := newCluster("cluster")
@@ -672,6 +670,8 @@ func TestReconcileIfJoinNodePoolsAndControlPlaneIsReady(t *testing.T) {
 	for _, rt := range useCases {
 		rt := rt // pin!
 		t.Run(rt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			config := rt.configBuilder(rt.machinePool, rt.configName)
 
 			objects := []runtime.Object{
@@ -862,9 +862,7 @@ func TestBootstrapTokenTTLExtension(t *testing.T) {
 }
 
 // Ensure the discovery portion of the JoinConfiguration gets generated correctly.
-func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testing.T) {
-	g := NewWithT(t)
-
+func TestKubeadmConfigReconciler_Reconcile_DiscoveryReconcileBehaviors(t *testing.T) {
 	k := &KubeadmConfigReconciler{
 		Log:                log.Log,
 		Client:             fake.NewFakeClientWithScheme(setupScheme()),
@@ -890,7 +888,7 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testin
 		name              string
 		cluster           *clusterv1.Cluster
 		config            *bootstrapv1.KubeadmConfig
-		validateDiscovery func(*bootstrapv1.KubeadmConfig) error
+		validateDiscovery func(*WithT, *bootstrapv1.KubeadmConfig) error
 	}{
 		{
 			name:    "Automatically generate token if discovery not specified",
@@ -902,7 +900,7 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testin
 					},
 				},
 			},
-			validateDiscovery: func(c *bootstrapv1.KubeadmConfig) error {
+			validateDiscovery: func(g *WithT, c *bootstrapv1.KubeadmConfig) error {
 				d := c.Spec.JoinConfiguration.Discovery
 				g.Expect(d.BootstrapToken).NotTo(BeNil())
 				g.Expect(d.BootstrapToken.Token).NotTo(Equal(""))
@@ -923,7 +921,7 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testin
 					},
 				},
 			},
-			validateDiscovery: func(c *bootstrapv1.KubeadmConfig) error {
+			validateDiscovery: func(g *WithT, c *bootstrapv1.KubeadmConfig) error {
 				d := c.Spec.JoinConfiguration.Discovery
 				g.Expect(d.BootstrapToken).To(BeNil())
 				return nil
@@ -944,7 +942,7 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testin
 					},
 				},
 			},
-			validateDiscovery: func(c *bootstrapv1.KubeadmConfig) error {
+			validateDiscovery: func(g *WithT, c *bootstrapv1.KubeadmConfig) error {
 				d := c.Spec.JoinConfiguration.Discovery
 				g.Expect(d.BootstrapToken.APIServerEndpoint).To(Equal("bar.com:6443"))
 				return nil
@@ -965,7 +963,7 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testin
 					},
 				},
 			},
-			validateDiscovery: func(c *bootstrapv1.KubeadmConfig) error {
+			validateDiscovery: func(g *WithT, c *bootstrapv1.KubeadmConfig) error {
 				d := c.Spec.JoinConfiguration.Discovery
 				g.Expect(d.BootstrapToken.Token).To(Equal("abcdef.0123456789abcdef"))
 				return nil
@@ -985,7 +983,7 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testin
 					},
 				},
 			},
-			validateDiscovery: func(c *bootstrapv1.KubeadmConfig) error {
+			validateDiscovery: func(g *WithT, c *bootstrapv1.KubeadmConfig) error {
 				d := c.Spec.JoinConfiguration.Discovery
 				g.Expect(reflect.DeepEqual(d.BootstrapToken.CACertHashes, dummyCAHash)).To(BeTrue())
 				return nil
@@ -995,10 +993,12 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testin
 
 	for _, tc := range testcases {
 		t.Run(tc.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			err := k.reconcileDiscovery(context.Background(), tc.cluster, tc.config, secret.Certificates{})
 			g.Expect(err).NotTo(HaveOccurred())
 
-			err = tc.validateDiscovery(tc.config)
+			err = tc.validateDiscovery(g, tc.config)
 			g.Expect(err).NotTo(HaveOccurred())
 		})
 	}
@@ -1006,8 +1006,6 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileBehaviors(t *testin
 
 // Test failure cases for the discovery reconcile function.
 func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileFailureBehaviors(t *testing.T) {
-	g := NewWithT(t)
-
 	k := &KubeadmConfigReconciler{
 		Log:    log.Log,
 		Client: nil,
@@ -1037,6 +1035,8 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileFailureBehaviors(t
 
 	for _, tc := range testcases {
 		t.Run(tc.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			err := k.reconcileDiscovery(context.Background(), tc.cluster, tc.config, secret.Certificates{})
 			g.Expect(err).To(HaveOccurred())
 		})
@@ -1045,8 +1045,6 @@ func TestKubeadmConfigReconciler_Reconcile_DisocveryReconcileFailureBehaviors(t
 
 // Set cluster configuration defaults based on dynamic values from the cluster object.
 func TestKubeadmConfigReconciler_Reconcile_DynamicDefaultsForClusterConfiguration(t *testing.T) {
-	g := NewWithT(t)
-
 	k := &KubeadmConfigReconciler{
 		Log:    log.Log,
 		Client: nil,
@@ -1123,6 +1121,8 @@ func TestKubeadmConfigReconciler_Reconcile_DynamicDefaultsForClusterConfiguratio
 
 	for _, tc := range testcases {
 		t.Run(tc.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			k.reconcileTopLevelObjectSettings(tc.cluster, tc.machine, tc.config)
 
 			g.Expect(tc.config.Spec.ClusterConfiguration.ControlPlaneEndpoint).To(Equal("myControlPlaneEndpoint:6443"))
@@ -1137,8 +1137,6 @@ func TestKubeadmConfigReconciler_Reconcile_DynamicDefaultsForClusterConfiguratio
 
 // Allow users to skip CA Verification if they *really* want to.
 func TestKubeadmConfigReconciler_Reconcile_AlwaysCheckCAVerificationUnlessRequestedToSkip(t *testing.T) {
-	g := NewWithT(t)
-
 	// Setup work for an initialized cluster
 	clusterName := "my-cluster"
 	cluster := newCluster(clusterName)
@@ -1194,6 +1192,8 @@ func TestKubeadmConfigReconciler_Reconcile_AlwaysCheckCAVerificationUnlessReques
 	}
 	for _, tc := range testcases {
 		t.Run(tc.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			myclient := fake.NewFakeClientWithScheme(setupScheme(), objects...)
 			reconciler := KubeadmConfigReconciler{
 				Client:             myclient,
diff --git a/bootstrap/kubeadm/internal/cloudinit/controlplane_test.go b/bootstrap/kubeadm/internal/cloudinit/controlplane_test.go
index 51cb7e8e7..6706538c8 100644
--- a/bootstrap/kubeadm/internal/cloudinit/controlplane_test.go
+++ b/bootstrap/kubeadm/internal/cloudinit/controlplane_test.go
@@ -23,8 +23,6 @@ import (
 )
 
 func TestTemplateYAMLIndent(t *testing.T) {
-	g := NewWithT(t)
-
 	testcases := []struct {
 		name     string
 		input    string
@@ -48,6 +46,8 @@ func TestTemplateYAMLIndent(t *testing.T) {
 	for _, tc := range testcases {
 		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(templateYAMLIndent(tc.indent, tc.input)).To(Equal(tc.expected))
 		})
 	}
diff --git a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go
index e7e991a11..4b777680e 100644
--- a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go
+++ b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go
@@ -110,6 +110,8 @@ func TestControlPlaneInitMutex_Lock(t *testing.T) {
 	for _, tc := range tests {
 		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			l := &ControlPlaneInitMutex{
 				log:    log.Log,
 				client: tc.client,
@@ -128,7 +130,7 @@ func TestControlPlaneInitMutex_Lock(t *testing.T) {
 				},
 			}
 
-			g.Expect(l.Lock(context.Background(), cluster, machine)).To(Equal(tc.shouldAcquire))
+			gs.Expect(l.Lock(context.Background(), cluster, machine)).To(Equal(tc.shouldAcquire))
 		})
 	}
 }
@@ -192,6 +194,8 @@ func TestControlPlaneInitMutex_UnLock(t *testing.T) {
 	for _, tc := range tests {
 		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			l := &ControlPlaneInitMutex{
 				log:    log.Log,
 				client: tc.client,
@@ -205,7 +209,7 @@ func TestControlPlaneInitMutex_UnLock(t *testing.T) {
 				},
 			}
 
-			g.Expect(l.Unlock(context.Background(), cluster)).To(Equal(tc.shouldRelease))
+			gs.Expect(l.Unlock(context.Background(), cluster)).To(Equal(tc.shouldRelease))
 		})
 	}
 }
diff --git a/bootstrap/kubeadm/types/v1beta1/bootstraptokenstring_test.go b/bootstrap/kubeadm/types/v1beta1/bootstraptokenstring_test.go
index c17f03ef1..9ff231f97 100644
--- a/bootstrap/kubeadm/types/v1beta1/bootstraptokenstring_test.go
+++ b/bootstrap/kubeadm/types/v1beta1/bootstraptokenstring_test.go
@@ -27,8 +27,6 @@ import (
 )
 
 func TestMarshalJSON(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		bts      BootstrapTokenString
 		expected string
@@ -39,6 +37,8 @@ func TestMarshalJSON(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.bts.ID, func(t *testing.T) {
+			g := NewWithT(t)
+
 			b, err := json.Marshal(rt.bts)
 			g.Expect(err).NotTo(HaveOccurred())
 			g.Expect(b).To(BeEquivalentTo(rt.expected))
@@ -47,8 +47,6 @@ func TestMarshalJSON(t *testing.T) {
 }
 
 func TestUnmarshalJSON(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		input         string
 		bts           *BootstrapTokenString
@@ -65,6 +63,8 @@ func TestUnmarshalJSON(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.input, func(t *testing.T) {
+			g := NewWithT(t)
+
 			newbts := &BootstrapTokenString{}
 			err := json.Unmarshal([]byte(rt.input), newbts)
 			if rt.expectedError {
@@ -78,8 +78,6 @@ func TestUnmarshalJSON(t *testing.T) {
 }
 
 func TestJSONRoundtrip(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		input string
 		bts   *BootstrapTokenString
@@ -89,6 +87,8 @@ func TestJSONRoundtrip(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.input, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(roundtrip(rt.input, rt.bts)).To(Succeed())
 		})
 	}
@@ -132,8 +132,6 @@ func roundtrip(input string, bts *BootstrapTokenString) error {
 }
 
 func TestTokenFromIDAndSecret(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		bts      BootstrapTokenString
 		expected string
@@ -144,14 +142,14 @@ func TestTokenFromIDAndSecret(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.bts.ID, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(rt.bts.String()).To(Equal(rt.expected))
 		})
 	}
 }
 
 func TestNewBootstrapTokenString(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		token         string
 		expectedError bool
@@ -176,6 +174,8 @@ func TestNewBootstrapTokenString(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.token, func(t *testing.T) {
+			g := NewWithT(t)
+
 			actual, err := NewBootstrapTokenString(rt.token)
 			if rt.expectedError {
 				g.Expect(err).To(HaveOccurred())
@@ -189,8 +189,6 @@ func TestNewBootstrapTokenString(t *testing.T) {
 }
 
 func TestNewBootstrapTokenStringFromIDAndSecret(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		id, secret    string
 		expectedError bool
@@ -212,6 +210,8 @@ func TestNewBootstrapTokenStringFromIDAndSecret(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.id, func(t *testing.T) {
+			g := NewWithT(t)
+
 			actual, err := NewBootstrapTokenStringFromIDAndSecret(rt.id, rt.secret)
 			if rt.expectedError {
 				g.Expect(err).To(HaveOccurred())
diff --git a/bootstrap/kubeadm/types/v1beta2/bootstraptokenstring_test.go b/bootstrap/kubeadm/types/v1beta2/bootstraptokenstring_test.go
index a13851449..67f2a0e40 100644
--- a/bootstrap/kubeadm/types/v1beta2/bootstraptokenstring_test.go
+++ b/bootstrap/kubeadm/types/v1beta2/bootstraptokenstring_test.go
@@ -27,8 +27,6 @@ import (
 )
 
 func TestMarshalJSON(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		bts      BootstrapTokenString
 		expected string
@@ -39,6 +37,8 @@ func TestMarshalJSON(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.bts.ID, func(t *testing.T) {
+			g := NewWithT(t)
+
 			b, err := json.Marshal(rt.bts)
 			g.Expect(err).NotTo(HaveOccurred())
 			g.Expect(string(b)).To(Equal(rt.expected))
@@ -47,8 +47,6 @@ func TestMarshalJSON(t *testing.T) {
 }
 
 func TestUnmarshalJSON(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		input         string
 		bts           *BootstrapTokenString
@@ -65,6 +63,8 @@ func TestUnmarshalJSON(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.input, func(t *testing.T) {
+			g := NewWithT(t)
+
 			newbts := &BootstrapTokenString{}
 			err := json.Unmarshal([]byte(rt.input), newbts)
 			if rt.expectedError {
@@ -78,8 +78,6 @@ func TestUnmarshalJSON(t *testing.T) {
 }
 
 func TestJSONRoundtrip(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		input string
 		bts   *BootstrapTokenString
@@ -89,6 +87,8 @@ func TestJSONRoundtrip(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.input, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(roundtrip(rt.input, rt.bts)).To(Succeed())
 		})
 	}
@@ -132,8 +132,6 @@ func roundtrip(input string, bts *BootstrapTokenString) error {
 }
 
 func TestTokenFromIDAndSecret(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		bts      BootstrapTokenString
 		expected string
@@ -144,14 +142,14 @@ func TestTokenFromIDAndSecret(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.bts.ID, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(rt.bts.String()).To(Equal(rt.expected))
 		})
 	}
 }
 
 func TestNewBootstrapTokenString(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		token         string
 		expectedError bool
@@ -176,6 +174,8 @@ func TestNewBootstrapTokenString(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.token, func(t *testing.T) {
+			g := NewWithT(t)
+
 			actual, err := NewBootstrapTokenString(rt.token)
 			if rt.expectedError {
 				g.Expect(err).To(HaveOccurred())
@@ -188,8 +188,6 @@ func TestNewBootstrapTokenString(t *testing.T) {
 }
 
 func TestNewBootstrapTokenStringFromIDAndSecret(t *testing.T) {
-	g := NewWithT(t)
-
 	var tests = []struct {
 		id, secret    string
 		expectedError bool
@@ -211,6 +209,8 @@ func TestNewBootstrapTokenStringFromIDAndSecret(t *testing.T) {
 	}
 	for _, rt := range tests {
 		t.Run(rt.id, func(t *testing.T) {
+			g := NewWithT(t)
+
 			actual, err := NewBootstrapTokenStringFromIDAndSecret(rt.id, rt.secret)
 			if rt.expectedError {
 				g.Expect(err).To(HaveOccurred())
diff --git a/cmd/clusterctl/api/v1alpha3/provider_type_test.go b/cmd/clusterctl/api/v1alpha3/provider_type_test.go
index a211ed001..56854a753 100644
--- a/cmd/clusterctl/api/v1alpha3/provider_type_test.go
+++ b/cmd/clusterctl/api/v1alpha3/provider_type_test.go
@@ -23,8 +23,6 @@ import (
 )
 
 func Test_Provider_ManifestLabel(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		provider     string
 		providerType ProviderType
@@ -85,6 +83,8 @@ func Test_Provider_ManifestLabel(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := &Provider{
 				ProviderName: tt.fields.provider,
 				Type:         string(tt.fields.providerType),
diff --git a/cmd/clusterctl/client/cluster/components_test.go b/cmd/clusterctl/client/cluster/components_test.go
index 5a43535dc..a0848413d 100644
--- a/cmd/clusterctl/client/cluster/components_test.go
+++ b/cmd/clusterctl/client/cluster/components_test.go
@@ -35,8 +35,6 @@ import (
 )
 
 func Test_providerComponents_Delete(t *testing.T) {
-	g := NewWithT(t)
-
 	labels := map[string]string{
 		clusterv1.ProviderLabelName: "infrastructure-infra",
 	}
@@ -250,6 +248,8 @@ func Test_providerComponents_Delete(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			proxy := test.NewFakeProxy().WithObjs(initObjs...)
 			c := newComponentsClient(proxy)
 			err := c.Delete(DeleteOptions{
diff --git a/cmd/clusterctl/client/cluster/installer_test.go b/cmd/clusterctl/client/cluster/installer_test.go
index 34fa0d72e..828fb7d9a 100644
--- a/cmd/clusterctl/client/cluster/installer_test.go
+++ b/cmd/clusterctl/client/cluster/installer_test.go
@@ -29,8 +29,6 @@ import (
 )
 
 func Test_providerInstaller_Validate(t *testing.T) {
-	g := NewWithT(t)
-
 	fakeReader := test.NewFakeReader().
 		WithProvider("cluster-api", clusterctlv1.CoreProviderType, "https://somewhere.com").
 		WithProvider("infra1", clusterctlv1.InfrastructureProviderType, "https://somewhere.com").
@@ -196,6 +194,8 @@ func Test_providerInstaller_Validate(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			configClient, _ := config.New("", config.InjectReader(fakeReader))
 
 			i := &providerInstaller{
@@ -268,8 +268,6 @@ func newFakeComponents(name string, providerType clusterctlv1.ProviderType, vers
 }
 
 func Test_shouldInstallSharedComponents(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		providerList *clusterctlv1.ProviderList
 		provider     clusterctlv1.Provider
@@ -325,6 +323,8 @@ func Test_shouldInstallSharedComponents(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := shouldInstallSharedComponents(tt.args.providerList, tt.args.provider)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
diff --git a/cmd/clusterctl/client/cluster/inventory_managementgroup_test.go b/cmd/clusterctl/client/cluster/inventory_managementgroup_test.go
index 4f509a3ea..d833b6c59 100644
--- a/cmd/clusterctl/client/cluster/inventory_managementgroup_test.go
+++ b/cmd/clusterctl/client/cluster/inventory_managementgroup_test.go
@@ -28,8 +28,6 @@ import (
 )
 
 func Test_inventoryClient_GetManagementGroups(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		proxy Proxy
 	}
@@ -146,6 +144,8 @@ func Test_inventoryClient_GetManagementGroups(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := &inventoryClient{
 				proxy: tt.fields.proxy,
 			}
diff --git a/cmd/clusterctl/client/cluster/inventory_test.go b/cmd/clusterctl/client/cluster/inventory_test.go
index 813ba219a..9155f0993 100644
--- a/cmd/clusterctl/client/cluster/inventory_test.go
+++ b/cmd/clusterctl/client/cluster/inventory_test.go
@@ -34,8 +34,6 @@ func fakePollImmediateWaiter(interval, timeout time.Duration, condition wait.Con
 }
 
 func Test_inventoryClient_EnsureCustomResourceDefinitions(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		alreadyHasCRD bool
 	}
@@ -61,6 +59,8 @@ func Test_inventoryClient_EnsureCustomResourceDefinitions(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := newInventoryClient(test.NewFakeProxy(), fakePollImmediateWaiter)
 			if tt.fields.alreadyHasCRD {
 				//forcing creation of metadata before test
@@ -80,8 +80,6 @@ func Test_inventoryClient_EnsureCustomResourceDefinitions(t *testing.T) {
 var fooProvider = clusterctlv1.Provider{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "ns1"}}
 
 func Test_inventoryClient_List(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		initObjs []runtime.Object
 	}
@@ -106,6 +104,8 @@ func Test_inventoryClient_List(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := newInventoryClient(test.NewFakeProxy().WithObjs(tt.fields.initObjs...), fakePollImmediateWaiter)
 			got, err := p.List()
 			if tt.wantErr {
@@ -120,8 +120,6 @@ func Test_inventoryClient_List(t *testing.T) {
 }
 
 func Test_inventoryClient_Create(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		proxy Proxy
 	}
@@ -167,6 +165,8 @@ func Test_inventoryClient_Create(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := &inventoryClient{
 				proxy: tt.fields.proxy,
 			}
diff --git a/cmd/clusterctl/client/cluster/mover_test.go b/cmd/clusterctl/client/cluster/mover_test.go
index 2db6d6ab7..46d80c9d2 100644
--- a/cmd/clusterctl/client/cluster/mover_test.go
+++ b/cmd/clusterctl/client/cluster/mover_test.go
@@ -359,10 +359,11 @@ var moveTests = []struct {
 }
 
 func Test_getMoveSequence(t *testing.T) {
-	g := NewWithT(t)
 	// NB. we are testing the move and move sequence using the same set of moveTests, but checking the results at different stages of the move process
 	for _, tt := range moveTests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			// Create an objectGraph bound a source cluster with all the CRDs for the types involved in the test.
 			graph := getObjectGraphWithObjs(tt.fields.objs)
 
@@ -390,10 +391,11 @@ func Test_getMoveSequence(t *testing.T) {
 }
 
 func Test_objectMover_move(t *testing.T) {
-	g := NewWithT(t)
 	// NB. we are testing the move and move sequence using the same set of moveTests, but checking the results at different stages of the move process
 	for _, tt := range moveTests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			// Create an objectGraph bound a source cluster with all the CRDs for the types involved in the test.
 			graph := getObjectGraphWithObjs(tt.fields.objs)
 
@@ -463,8 +465,6 @@ func Test_objectMover_move(t *testing.T) {
 }
 
 func Test_objectMover_checkProvisioningCompleted(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		objs []runtime.Object
 	}
@@ -634,6 +634,8 @@ func Test_objectMover_checkProvisioningCompleted(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			// Create an objectGraph bound a source cluster with all the CRDs for the types involved in the test.
 			graph := getObjectGraphWithObjs(tt.fields.objs)
 
@@ -658,8 +660,6 @@ func Test_objectMover_checkProvisioningCompleted(t *testing.T) {
 }
 
 func Test_objectsMoverService_checkTargetProviders(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		fromProxy Proxy
 	}
@@ -774,6 +774,8 @@ func Test_objectsMoverService_checkTargetProviders(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			o := &objectMover{
 				fromProviderInventory: newInventoryClient(tt.fields.fromProxy, nil),
 			}
diff --git a/cmd/clusterctl/client/cluster/objectgraph_test.go b/cmd/clusterctl/client/cluster/objectgraph_test.go
index b6c7a70b3..cd1e6b13e 100644
--- a/cmd/clusterctl/client/cluster/objectgraph_test.go
+++ b/cmd/clusterctl/client/cluster/objectgraph_test.go
@@ -33,8 +33,6 @@ import (
 )
 
 func TestObjectGraph_getDiscoveryTypeMetaList(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		proxy Proxy
 	}
@@ -64,6 +62,8 @@ func TestObjectGraph_getDiscoveryTypeMetaList(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			graph := newObjectGraph(tt.fields.proxy)
 			got, err := graph.getDiscoveryTypes()
 			if tt.wantErr {
@@ -867,10 +867,11 @@ func getDetachedObjectGraphWihObjs(objs []runtime.Object) (*objectGraph, error)
 }
 
 func TestObjectGraph_addObj_WithFakeObjects(t *testing.T) {
-	g := NewWithT(t)
 	// NB. we are testing the graph is properly built starting from objects (this test) or from the same objects read from the cluster (TestGraphBuilder_Discovery)
 	for _, tt := range objectGraphsTests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			graph, err := getDetachedObjectGraphWihObjs(tt.args.objs)
 			g.Expect(err).NotTo(HaveOccurred())
 
@@ -914,10 +915,11 @@ func getFakeDiscoveryTypes(graph *objectGraph) ([]metav1.TypeMeta, error) {
 }
 
 func TestObjectGraph_Discovery(t *testing.T) {
-	g := NewWithT(t)
 	// NB. we are testing the graph is properly built starting from objects (TestGraphBuilder_addObj_WithFakeObjects) or from the same objects read from the cluster (this test).
 	for _, tt := range objectGraphsTests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			// Create an objectGraph bound to a source cluster with all the CRDs for the types involved in the test.
 			graph := getObjectGraphWithObjs(tt.args.objs)
 
@@ -939,8 +941,6 @@ func TestObjectGraph_Discovery(t *testing.T) {
 }
 
 func TestObjectGraph_DiscoveryByNamespace(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		namespace string
 		objs      []runtime.Object
@@ -1035,6 +1035,8 @@ func TestObjectGraph_DiscoveryByNamespace(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			// Create an objectGraph bound to a source cluster with all the CRDs for the types involved in the test.
 			graph := getObjectGraphWithObjs(tt.args.objs)
 
@@ -1056,8 +1058,6 @@ func TestObjectGraph_DiscoveryByNamespace(t *testing.T) {
 }
 
 func Test_objectGraph_setSoftOwnership(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		objs []runtime.Object
 	}
@@ -1081,6 +1081,8 @@ func Test_objectGraph_setSoftOwnership(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			graph, err := getDetachedObjectGraphWihObjs(tt.fields.objs)
 			g.Expect(err).NotTo(HaveOccurred())
 
@@ -1105,8 +1107,6 @@ func Test_objectGraph_setSoftOwnership(t *testing.T) {
 }
 
 func Test_objectGraph_setClusterTenants(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		objs []runtime.Object
 	}
@@ -1236,6 +1236,8 @@ func Test_objectGraph_setClusterTenants(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			gb, err := getDetachedObjectGraphWihObjs(tt.fields.objs)
 			g.Expect(err).NotTo(HaveOccurred())
 
diff --git a/cmd/clusterctl/client/cluster/template_test.go b/cmd/clusterctl/client/cluster/template_test.go
index 9b1040f0e..1fc26f7fe 100644
--- a/cmd/clusterctl/client/cluster/template_test.go
+++ b/cmd/clusterctl/client/cluster/template_test.go
@@ -131,6 +131,8 @@ func Test_templateClient_GetFromConfigMap(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			tc := &templateClient{
 				proxy:        tt.fields.proxy,
 				configClient: tt.fields.configClient,
@@ -199,6 +201,8 @@ func Test_templateClient_getGitHubFileContent(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			c := &templateClient{
 				configClient: configClient,
 				gitHubClientFactory: func(configVariablesClient config.VariablesClient) (*github.Client, error) {
@@ -256,6 +260,8 @@ func Test_templateClient_getLocalFileContent(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			c := &templateClient{}
 			got, err := c.getLocalFileContent(tt.args.rURL)
 			if tt.wantErr {
@@ -332,6 +338,8 @@ func Test_templateClient_GetFromURL(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			c := &templateClient{
 				configClient: configClient,
 				gitHubClientFactory: func(configVariablesClient config.VariablesClient) (*github.Client, error) {
diff --git a/cmd/clusterctl/client/cluster/upgrader_info_test.go b/cmd/clusterctl/client/cluster/upgrader_info_test.go
index 0f594de9f..a0c0987e3 100644
--- a/cmd/clusterctl/client/cluster/upgrader_info_test.go
+++ b/cmd/clusterctl/client/cluster/upgrader_info_test.go
@@ -30,8 +30,6 @@ import (
 )
 
 func Test_providerUpgrader_getUpgradeInfo(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		reader     config.Reader
 		repository repository.Repository
@@ -151,6 +149,8 @@ func Test_providerUpgrader_getUpgradeInfo(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			configClient, _ := config.New("", config.InjectReader(tt.fields.reader))
 
 			u := &providerUpgrader{
@@ -171,8 +171,6 @@ func Test_providerUpgrader_getUpgradeInfo(t *testing.T) {
 }
 
 func Test_upgradeInfo_getContractsForUpgrade(t *testing.T) {
-	g := NewWithT(t)
-
 	type field struct {
 		currentVersion string
 		metadata       *clusterctlv1.Metadata
@@ -233,6 +231,8 @@ func Test_upgradeInfo_getContractsForUpgrade(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			upgradeInfo := newUpgradeInfo(tt.field.metadata, version.MustParseSemantic(tt.field.currentVersion), nil)
 
 			got := upgradeInfo.getContractsForUpgrade()
@@ -242,8 +242,6 @@ func Test_upgradeInfo_getContractsForUpgrade(t *testing.T) {
 }
 
 func Test_upgradeInfo_getLatestNextVersion(t *testing.T) {
-	g := NewWithT(t)
-
 	type field struct {
 		currentVersion string
 		nextVersions   []string
@@ -329,6 +327,8 @@ func Test_upgradeInfo_getLatestNextVersion(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			upgradeInfo := newUpgradeInfo(tt.field.metadata, version.MustParseSemantic(tt.field.currentVersion), toSemanticVersions(tt.field.nextVersions))
 
 			got := upgradeInfo.getLatestNextVersion(tt.args.contract)
diff --git a/cmd/clusterctl/client/cluster/upgrader_test.go b/cmd/clusterctl/client/cluster/upgrader_test.go
index 41a93229f..8239e6d24 100644
--- a/cmd/clusterctl/client/cluster/upgrader_test.go
+++ b/cmd/clusterctl/client/cluster/upgrader_test.go
@@ -28,8 +28,6 @@ import (
 )
 
 func Test_providerUpgrader_Plan(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		reader     config.Reader
 		repository map[string]repository.Repository
@@ -483,6 +481,8 @@ func Test_providerUpgrader_Plan(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			configClient, _ := config.New("", config.InjectReader(tt.fields.reader))
 
 			u := &providerUpgrader{
@@ -505,8 +505,6 @@ func Test_providerUpgrader_Plan(t *testing.T) {
 }
 
 func Test_providerUpgrader_createCustomPlan(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		reader     config.Reader
 		repository map[string]repository.Repository
@@ -772,6 +770,8 @@ func Test_providerUpgrader_createCustomPlan(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			configClient, _ := config.New("", config.InjectReader(tt.fields.reader))
 
 			u := &providerUpgrader{
diff --git a/cmd/clusterctl/client/common_test.go b/cmd/clusterctl/client/common_test.go
index 8c44e866f..272d7b51f 100644
--- a/cmd/clusterctl/client/common_test.go
+++ b/cmd/clusterctl/client/common_test.go
@@ -23,8 +23,6 @@ import (
 )
 
 func Test_parseProviderName(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		provider string
 	}
@@ -56,6 +54,8 @@ func Test_parseProviderName(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			gotName, gotVersion, err := parseProviderName(tt.args.provider)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
diff --git a/cmd/clusterctl/client/config/imagemeta_client_test.go b/cmd/clusterctl/client/config/imagemeta_client_test.go
index 1265e10a6..4214b83d5 100644
--- a/cmd/clusterctl/client/config/imagemeta_client_test.go
+++ b/cmd/clusterctl/client/config/imagemeta_client_test.go
@@ -25,8 +25,6 @@ import (
 )
 
 func Test_imageMetaClient_AlterImage(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		reader Reader
 	}
@@ -132,6 +130,8 @@ func Test_imageMetaClient_AlterImage(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := newImageMetaClient(tt.fields.reader)
 
 			got, err := p.AlterImage(tt.args.component, tt.args.image)
diff --git a/cmd/clusterctl/client/config/providers_client_test.go b/cmd/clusterctl/client/config/providers_client_test.go
index a927f8275..4b3bf632c 100644
--- a/cmd/clusterctl/client/config/providers_client_test.go
+++ b/cmd/clusterctl/client/config/providers_client_test.go
@@ -28,8 +28,6 @@ import (
 )
 
 func Test_providers_List(t *testing.T) {
-	g := NewWithT(t)
-
 	reader := test.NewFakeReader()
 
 	p := &providersClient{
@@ -120,6 +118,8 @@ func Test_providers_List(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := &providersClient{
 				reader: tt.fields.configGetter,
 			}
@@ -136,8 +136,6 @@ func Test_providers_List(t *testing.T) {
 }
 
 func Test_validateProvider(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		r Provider
 	}
@@ -219,6 +217,8 @@ func Test_validateProvider(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			err := validateProvider(tt.args.r)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -249,8 +249,6 @@ func Test_providers_Defaults(t *testing.T) {
 }
 
 func Test_providers_Get(t *testing.T) {
-	g := NewWithT(t)
-
 	reader := test.NewFakeReader()
 
 	p := &providersClient{
@@ -317,6 +315,8 @@ func Test_providers_Get(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := &providersClient{
 				reader: reader,
 			}
diff --git a/cmd/clusterctl/client/config/reader_viper_test.go b/cmd/clusterctl/client/config/reader_viper_test.go
index 0e5d52bac..e30dac7f4 100644
--- a/cmd/clusterctl/client/config/reader_viper_test.go
+++ b/cmd/clusterctl/client/config/reader_viper_test.go
@@ -73,18 +73,20 @@ func Test_viperReader_Get(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			v := &viperReader{}
 
-			g.Expect(v.Init(configFile)).To(Succeed())
+			gs.Expect(v.Init(configFile)).To(Succeed())
 
 			got, err := v.Get(tt.args.key)
 			if tt.wantErr {
-				g.Expect(err).To(HaveOccurred())
+				gs.Expect(err).To(HaveOccurred())
 				return
 			}
 
-			g.Expect(err).NotTo(HaveOccurred())
-			g.Expect(got).To(Equal(tt.want))
+			gs.Expect(err).NotTo(HaveOccurred())
+			gs.Expect(got).To(Equal(tt.want))
 		})
 	}
 }
@@ -122,15 +124,17 @@ func Test_viperReader_Set(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			v := &viperReader{}
 
-			g.Expect(v.Init(configFile)).To(Succeed())
+			gs.Expect(v.Init(configFile)).To(Succeed())
 
 			v.Set(tt.args.key, tt.args.value)
 
 			got, err := v.Get(tt.args.key)
-			g.Expect(err).NotTo(HaveOccurred())
-			g.Expect(got).To(Equal(tt.want))
+			gs.Expect(err).NotTo(HaveOccurred())
+			gs.Expect(got).To(Equal(tt.want))
 		})
 	}
 }
diff --git a/cmd/clusterctl/client/config/variables_client_test.go b/cmd/clusterctl/client/config/variables_client_test.go
index c8a973970..94bde37ec 100644
--- a/cmd/clusterctl/client/config/variables_client_test.go
+++ b/cmd/clusterctl/client/config/variables_client_test.go
@@ -25,8 +25,6 @@ import (
 )
 
 func Test_variables_Get(t *testing.T) {
-	g := NewWithT(t)
-
 	reader := test.NewFakeReader().WithVar("foo", "bar")
 
 	type args struct {
@@ -56,6 +54,8 @@ func Test_variables_Get(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			p := &variablesClient{
 				reader: reader,
 			}
diff --git a/cmd/clusterctl/client/config_test.go b/cmd/clusterctl/client/config_test.go
index 759645bd4..304a5d54a 100644
--- a/cmd/clusterctl/client/config_test.go
+++ b/cmd/clusterctl/client/config_test.go
@@ -32,8 +32,6 @@ import (
 )
 
 func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
-	g := NewWithT(t)
-
 	customProviderConfig := config.NewProvider("custom", "url", clusterctlv1.BootstrapProviderType)
 
 	type field struct {
@@ -83,6 +81,8 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := tt.field.client.GetProvidersConfig()
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -101,8 +101,6 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
 }
 
 func Test_clusterctlClient_GetProviderComponents(t *testing.T) {
-	g := NewWithT(t)
-
 	config1 := newFakeConfig().
 		WithProvider(capiProviderConfig)
 
@@ -154,6 +152,8 @@ func Test_clusterctlClient_GetProviderComponents(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := client.GetProviderComponents(tt.args.provider, capiProviderConfig.Type(), tt.args.targetNameSpace, tt.args.watchingNamespace)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -168,8 +168,6 @@ func Test_clusterctlClient_GetProviderComponents(t *testing.T) {
 }
 
 func Test_clusterctlClient_templateOptionsToVariables(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		options GetClusterTemplateOptions
 	}
@@ -277,6 +275,8 @@ func Test_clusterctlClient_templateOptionsToVariables(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			config := newFakeConfig().
 				WithVar("KUBERNETES_VERSION", "v3.4.5") // with this line we are simulating an env var
 
@@ -462,19 +462,21 @@ func Test_clusterctlClient_GetClusterTemplate(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			got, err := client.GetClusterTemplate(tt.args.options)
 			if tt.wantErr {
-				g.Expect(err).To(HaveOccurred())
+				gs.Expect(err).To(HaveOccurred())
 				return
 			}
-			g.Expect(err).NotTo(HaveOccurred())
+			gs.Expect(err).NotTo(HaveOccurred())
 
-			g.Expect(got.Variables()).To(Equal(tt.want.variables))
-			g.Expect(got.TargetNamespace()).To(Equal(tt.want.targetNamespace))
+			gs.Expect(got.Variables()).To(Equal(tt.want.variables))
+			gs.Expect(got.TargetNamespace()).To(Equal(tt.want.targetNamespace))
 
 			gotYaml, err := got.Yaml()
-			g.Expect(err).NotTo(HaveOccurred())
-			g.Expect(gotYaml).To(Equal(tt.want.yaml))
+			gs.Expect(err).NotTo(HaveOccurred())
+			gs.Expect(gotYaml).To(Equal(tt.want.yaml))
 		})
 	}
 }
diff --git a/cmd/clusterctl/client/delete_test.go b/cmd/clusterctl/client/delete_test.go
index 121947a43..a9732ea06 100644
--- a/cmd/clusterctl/client/delete_test.go
+++ b/cmd/clusterctl/client/delete_test.go
@@ -27,8 +27,6 @@ import (
 )
 
 func Test_clusterctlClient_Delete(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		client *fakeClient
 	}
@@ -108,6 +106,8 @@ func Test_clusterctlClient_Delete(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			err := tt.fields.client.Delete(tt.args.options)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
diff --git a/cmd/clusterctl/client/init_test.go b/cmd/clusterctl/client/init_test.go
index e7eb5c90f..75ba15cca 100644
--- a/cmd/clusterctl/client/init_test.go
+++ b/cmd/clusterctl/client/init_test.go
@@ -29,8 +29,6 @@ import (
 )
 
 func Test_clusterctlClient_Init(t *testing.T) {
-	g := NewWithT(t)
-
 	type field struct {
 		client *fakeClient
 		hasCRD bool
@@ -325,6 +323,7 @@ func Test_clusterctlClient_Init(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
 
 			if tt.field.hasCRD {
 				g.Expect(tt.field.client.clusters["kubeconfig"].ProviderInventory().EnsureCustomResourceDefinitions()).To(Succeed())
diff --git a/cmd/clusterctl/client/repository/client_test.go b/cmd/clusterctl/client/repository/client_test.go
index 808078a7d..c7ff8f33c 100644
--- a/cmd/clusterctl/client/repository/client_test.go
+++ b/cmd/clusterctl/client/repository/client_test.go
@@ -61,11 +61,13 @@ func Test_newRepositoryClient_LocalFileSystemRepository(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			repoClient, err := newRepositoryClient(tt.fields.provider, configClient)
-			g.Expect(err).NotTo(HaveOccurred())
+			gs.Expect(err).NotTo(HaveOccurred())
 
 			var expected *localRepository
-			g.Expect(repoClient.repository).To(BeAssignableToTypeOf(expected))
+			gs.Expect(repoClient.repository).To(BeAssignableToTypeOf(expected))
 		})
 	}
 }
diff --git a/cmd/clusterctl/client/repository/components_client_test.go b/cmd/clusterctl/client/repository/components_client_test.go
index d9fd6e467..a4c720845 100644
--- a/cmd/clusterctl/client/repository/components_client_test.go
+++ b/cmd/clusterctl/client/repository/components_client_test.go
@@ -231,20 +231,22 @@ func Test_componentsClient_Get(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			f := newComponentsClient(tt.fields.provider, tt.fields.repository, configClient)
 			got, err := f.Get(tt.args.version, tt.args.targetNamespace, tt.args.watchingNamespace)
 			if tt.wantErr {
-				g.Expect(err).To(HaveOccurred())
+				gs.Expect(err).To(HaveOccurred())
 				return
 			}
-			g.Expect(err).NotTo(HaveOccurred())
+			gs.Expect(err).NotTo(HaveOccurred())
 
-			g.Expect(got.Name()).To(Equal(tt.want.provider.Name()))
-			g.Expect(got.Type()).To(Equal(tt.want.provider.Type()))
-			g.Expect(got.Version()).To(Equal(tt.want.version))
-			g.Expect(got.TargetNamespace()).To(Equal(tt.want.targetNamespace))
-			g.Expect(got.WatchingNamespace()).To(Equal(tt.want.watchingNamespace))
-			g.Expect(got.Variables()).To(Equal(tt.want.variables))
+			gs.Expect(got.Name()).To(Equal(tt.want.provider.Name()))
+			gs.Expect(got.Type()).To(Equal(tt.want.provider.Type()))
+			gs.Expect(got.Version()).To(Equal(tt.want.version))
+			gs.Expect(got.TargetNamespace()).To(Equal(tt.want.targetNamespace))
+			gs.Expect(got.WatchingNamespace()).To(Equal(tt.want.watchingNamespace))
+			gs.Expect(got.Variables()).To(Equal(tt.want.variables))
 
 			yaml, err := got.Yaml()
 			if err != nil {
@@ -253,18 +255,18 @@ func Test_componentsClient_Get(t *testing.T) {
 			}
 
 			if len(tt.want.variables) > 0 {
-				g.Expect(yaml).To(ContainSubstring(variableValue))
+				gs.Expect(yaml).To(ContainSubstring(variableValue))
 			}
 
 			for _, o := range got.InstanceObjs() {
 				for _, v := range []string{clusterctlv1.ClusterctlLabelName, clusterv1.ProviderLabelName} {
-					g.Expect(o.GetLabels()).To(HaveKey(v))
+					gs.Expect(o.GetLabels()).To(HaveKey(v))
 				}
 			}
 
 			for _, o := range got.SharedObjs() {
 				for _, v := range []string{clusterctlv1.ClusterctlLabelName, clusterv1.ProviderLabelName, clusterctlv1.ClusterctlResourceLifecyleLabelName} {
-					g.Expect(o.GetLabels()).To(HaveKey(v))
+					gs.Expect(o.GetLabels()).To(HaveKey(v))
 				}
 			}
 		})
diff --git a/cmd/clusterctl/client/repository/components_test.go b/cmd/clusterctl/client/repository/components_test.go
index ea0e2a569..72bf088d2 100644
--- a/cmd/clusterctl/client/repository/components_test.go
+++ b/cmd/clusterctl/client/repository/components_test.go
@@ -30,8 +30,6 @@ import (
 )
 
 func Test_inspectVariables(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		data string
 	}
@@ -64,14 +62,14 @@ func Test_inspectVariables(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(inspectVariables([]byte(tt.args.data))).To(Equal(tt.want))
 		})
 	}
 }
 
 func Test_replaceVariables(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		yaml                  []byte
 		variables             []string
@@ -107,6 +105,8 @@ func Test_replaceVariables(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := replaceVariables(tt.args.yaml, tt.args.variables, tt.args.configVariablesClient)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -120,8 +120,6 @@ func Test_replaceVariables(t *testing.T) {
 }
 
 func Test_inspectTargetNamespace(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		objs []unstructured.Unstructured
 	}
@@ -182,6 +180,8 @@ func Test_inspectTargetNamespace(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := inspectTargetNamespace(tt.args.objs)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -195,8 +195,6 @@ func Test_inspectTargetNamespace(t *testing.T) {
 }
 
 func Test_fixTargetNamespace(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		objs            []unstructured.Unstructured
 		targetNamespace string
@@ -279,6 +277,8 @@ func Test_fixTargetNamespace(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got := fixTargetNamespace(tt.args.objs, tt.args.targetNamespace)
 			g.Expect(got).To(ContainElements(tt.want)) //skipping from test the automatically added namespace Object
 		})
@@ -286,8 +286,6 @@ func Test_fixTargetNamespace(t *testing.T) {
 }
 
 func Test_addNamespaceIfMissing(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		objs            []unstructured.Unstructured
 		targetNamespace string
@@ -322,6 +320,8 @@ func Test_addNamespaceIfMissing(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got := addNamespaceIfMissing(tt.args.objs, tt.args.targetNamespace)
 
 			wgot, err := inspectTargetNamespace(got)
@@ -332,8 +332,6 @@ func Test_addNamespaceIfMissing(t *testing.T) {
 }
 
 func Test_fixRBAC(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		objs            []unstructured.Unstructured
 		targetNamespace string
@@ -582,6 +580,8 @@ func Test_fixRBAC(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := fixRBAC(tt.args.objs, tt.args.targetNamespace)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -620,8 +620,6 @@ func fakeDeployment(watchNamespace string) unstructured.Unstructured {
 }
 
 func Test_inspectWatchNamespace(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		objs []unstructured.Unstructured
 	}
@@ -671,6 +669,8 @@ func Test_inspectWatchNamespace(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := inspectWatchNamespace(tt.args.objs)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -684,8 +684,6 @@ func Test_inspectWatchNamespace(t *testing.T) {
 }
 
 func Test_fixWatchNamespace(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		objs              []unstructured.Unstructured
 		watchingNamespace string
@@ -728,6 +726,8 @@ func Test_fixWatchNamespace(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := fixWatchNamespace(tt.args.objs, tt.args.watchingNamespace)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -743,8 +743,6 @@ func Test_fixWatchNamespace(t *testing.T) {
 }
 
 func Test_addCommonLabels(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		objs         []unstructured.Unstructured
 		name         string
@@ -785,6 +783,8 @@ func Test_addCommonLabels(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got := addCommonLabels(tt.args.objs, config.NewProvider(tt.args.name, "", tt.args.providerType))
 			g.Expect(got).To(Equal(tt.want))
 		})
@@ -792,8 +792,6 @@ func Test_addCommonLabels(t *testing.T) {
 }
 
 func Test_splitInstanceAndSharedResources(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		objs []unstructured.Unstructured
 	}
@@ -935,6 +933,8 @@ func Test_splitInstanceAndSharedResources(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			gotInstanceObjs, gotWebHookObjs := splitInstanceAndSharedResources(tt.args.objs)
 			g.Expect(gotInstanceObjs).To(ConsistOf(tt.wantInstanceObjs))
 			g.Expect(gotWebHookObjs).To(ConsistOf(tt.wantSharedObjs))
diff --git a/cmd/clusterctl/client/repository/metadata_client_test.go b/cmd/clusterctl/client/repository/metadata_client_test.go
index 347a1a121..dca83641d 100644
--- a/cmd/clusterctl/client/repository/metadata_client_test.go
+++ b/cmd/clusterctl/client/repository/metadata_client_test.go
@@ -36,8 +36,6 @@ var metadataYaml = []byte("apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3\n" +
 	"")
 
 func Test_metadataClient_Get(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		provider   config.Provider
 		version    string
@@ -136,6 +134,8 @@ func Test_metadataClient_Get(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			f := &metadataClient{
 				configVarClient: test.NewFakeVariableClient(),
 				provider:        tt.fields.provider,
diff --git a/cmd/clusterctl/client/repository/repository_local_test.go b/cmd/clusterctl/client/repository/repository_local_test.go
index b00307ccd..4b8489009 100644
--- a/cmd/clusterctl/client/repository/repository_local_test.go
+++ b/cmd/clusterctl/client/repository/repository_local_test.go
@@ -30,8 +30,6 @@ import (
 )
 
 func Test_localRepository_newLocalRepository(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		provider              config.Provider
 		configVariablesClient config.VariablesClient
@@ -109,6 +107,8 @@ func Test_localRepository_newLocalRepository(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := newLocalRepository(tt.fields.provider, tt.fields.configVariablesClient)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -172,8 +172,6 @@ func Test_localRepository_newLocalRepository_Latest(t *testing.T) {
 }
 
 func Test_localRepository_GetFile(t *testing.T) {
-	g := NewWithT(t)
-
 	tmpDir := createTempDir(t)
 	defer os.RemoveAll(tmpDir)
 
@@ -256,6 +254,8 @@ func Test_localRepository_GetFile(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			r, err := newLocalRepository(tt.fields.provider, tt.fields.configVariablesClient)
 			g.Expect(err).NotTo(HaveOccurred())
 
@@ -272,8 +272,6 @@ func Test_localRepository_GetFile(t *testing.T) {
 }
 
 func Test_localRepository_GetVersions(t *testing.T) {
-	g := NewWithT(t)
-
 	tmpDir := createTempDir(t)
 	defer os.RemoveAll(tmpDir)
 
@@ -331,6 +329,8 @@ func Test_localRepository_GetVersions(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			r, err := newLocalRepository(tt.fields.provider, tt.fields.configVariablesClient)
 			g.Expect(err).NotTo(HaveOccurred())
 
diff --git a/cmd/clusterctl/client/repository/template_client_test.go b/cmd/clusterctl/client/repository/template_client_test.go
index 1b5ea4e8a..4a7b15f57 100644
--- a/cmd/clusterctl/client/repository/template_client_test.go
+++ b/cmd/clusterctl/client/repository/template_client_test.go
@@ -28,8 +28,6 @@ import (
 )
 
 func Test_templates_Get(t *testing.T) {
-	g := NewWithT(t)
-
 	p1 := config.NewProvider("p1", "", clusterctlv1.BootstrapProviderType)
 
 	type fields struct {
@@ -158,6 +156,8 @@ func Test_templates_Get(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			f := newTemplateClient(tt.fields.provider, tt.fields.version, tt.fields.repository, tt.fields.configVariablesClient)
 			got, err := f.Get(tt.args.flavor, tt.args.targetNamespace, tt.args.listVariablesOnly)
 			if tt.wantErr {
diff --git a/cmd/clusterctl/client/repository/template_test.go b/cmd/clusterctl/client/repository/template_test.go
index 27d4c4063..faaa4f04d 100644
--- a/cmd/clusterctl/client/repository/template_test.go
+++ b/cmd/clusterctl/client/repository/template_test.go
@@ -36,8 +36,6 @@ var templateMapYaml = []byte("apiVersion: v1\n" +
 	"  name: manager")
 
 func Test_newTemplate(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		rawYaml               []byte
 		configVariablesClient config.VariablesClient
@@ -85,6 +83,8 @@ func Test_newTemplate(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := NewTemplate(tt.args.rawYaml, tt.args.configVariablesClient, tt.args.targetNamespace, tt.args.listVariablesOnly)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
diff --git a/cmd/clusterctl/client/upgrade_test.go b/cmd/clusterctl/client/upgrade_test.go
index 68d236e15..e4e325d53 100644
--- a/cmd/clusterctl/client/upgrade_test.go
+++ b/cmd/clusterctl/client/upgrade_test.go
@@ -31,8 +31,6 @@ import (
 )
 
 func Test_clusterctlClient_ApplyUpgrade(t *testing.T) {
-	g := NewWithT(t)
-
 	type fields struct {
 		client *fakeClient
 	}
@@ -165,6 +163,8 @@ func Test_clusterctlClient_ApplyUpgrade(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			err := tt.fields.client.ApplyUpgrade(tt.args.options)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
@@ -260,8 +260,6 @@ func fakeProvider(name string, providerType clusterctlv1.ProviderType, version,
 }
 
 func Test_parseUpgradeItem(t *testing.T) {
-	g := NewWithT(t)
-
 	type args struct {
 		provider string
 	}
@@ -326,6 +324,8 @@ func Test_parseUpgradeItem(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := parseUpgradeItem(tt.args.provider, clusterctlv1.CoreProviderType)
 			if tt.wantErr {
 				g.Expect(err).To(HaveOccurred())
diff --git a/cmd/clusterctl/internal/util/objs_test.go b/cmd/clusterctl/internal/util/objs_test.go
index 05669fdd0..c3327eead 100644
--- a/cmd/clusterctl/internal/util/objs_test.go
+++ b/cmd/clusterctl/internal/util/objs_test.go
@@ -18,9 +18,10 @@ package util
 
 import (
 	"fmt"
-	"reflect"
 	"testing"
 
+	. "github.com/onsi/gomega"
+
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 )
 
@@ -128,17 +129,16 @@ func Test_inspectImages(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := InspectImages(tt.args.objs)
-			if (err != nil) != tt.wantErr {
-				t.Fatalf("error = %v, wantErr %v", err, tt.wantErr)
-			}
 			if tt.wantErr {
+				g.Expect(err).To(HaveOccurred())
 				return
 			}
 
-			if !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("got = %v, want %v", got, tt.want)
-			}
+			g.Expect(err).NotTo(HaveOccurred())
+			g.Expect(got).To(Equal(tt.want))
 		})
 	}
 }
@@ -191,22 +191,19 @@ func TestFixImages(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := FixImages(tt.args.objs, tt.args.alterImageFunc)
-			if (err != nil) != tt.wantErr {
-				t.Fatalf("error = %v, wantErr %v", err, tt.wantErr)
-			}
 			if tt.wantErr {
+				g.Expect(err).To(HaveOccurred())
 				return
 			}
 
-			gotImages, err := InspectImages(got)
-			if err != nil {
-				t.Fatal(err)
-			}
+			g.Expect(err).NotTo(HaveOccurred())
 
-			if !reflect.DeepEqual(gotImages, tt.want) {
-				t.Errorf("got = %v, want %v", got, tt.want)
-			}
+			gotImages, err := InspectImages(got)
+			g.Expect(err).NotTo(HaveOccurred())
+			g.Expect(gotImages).To(Equal(tt.want))
 		})
 	}
 }
diff --git a/cmd/clusterctl/log/logger_test.go b/cmd/clusterctl/log/logger_test.go
index 88fc1aa2c..cfe578c08 100644
--- a/cmd/clusterctl/log/logger_test.go
+++ b/cmd/clusterctl/log/logger_test.go
@@ -19,6 +19,8 @@ package log
 import (
 	"testing"
 
+	. "github.com/onsi/gomega"
+
 	"github.com/pkg/errors"
 )
 
@@ -91,18 +93,15 @@ func TestFlatten(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			got, err := flatten(logEntry{
 				Prefix: tt.args.prefix,
 				Level:  0,
 				Values: tt.args.kvList,
 			})
-			if err != nil {
-				t.Fatal(err)
-			}
-
-			if got != tt.want {
-				t.Errorf("Flatten() = %v, want %v", got, tt.want)
-			}
+			g.Expect(err).NotTo(HaveOccurred())
+			g.Expect(got).To(Equal(tt.want))
 		})
 	}
 }
diff --git a/cmd/clusterctl/test/e2e/go.mod b/cmd/clusterctl/test/e2e/go.mod
index 44913b542..a8b3e1246 100644
--- a/cmd/clusterctl/test/e2e/go.mod
+++ b/cmd/clusterctl/test/e2e/go.mod
@@ -11,7 +11,7 @@ require (
 	k8s.io/client-go v0.17.2
 	sigs.k8s.io/cluster-api v0.3.0-rc.2.0.20200302175844-3011d8c2580c
 	sigs.k8s.io/cluster-api/test/infrastructure/docker v0.3.0-rc.2.0.20200302175844-3011d8c2580c
-	sigs.k8s.io/controller-runtime v0.5.2
+	sigs.k8s.io/controller-runtime v0.5.1
 	sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802
 )
 
diff --git a/cmd/clusterctl/test/e2e/go.sum b/cmd/clusterctl/test/e2e/go.sum
index 90e895f33..1bf478aef 100644
--- a/cmd/clusterctl/test/e2e/go.sum
+++ b/cmd/clusterctl/test/e2e/go.sum
@@ -597,8 +597,8 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
 modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
 modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
 modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
-sigs.k8s.io/controller-runtime v0.5.2 h1:pyXbUfoTo+HA3jeIfr0vgi+1WtmNh0CwlcnQGLXwsSw=
-sigs.k8s.io/controller-runtime v0.5.2/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A=
+sigs.k8s.io/controller-runtime v0.5.1 h1:TNidCfVoU/cs2i+9xoTcL/l7yhl0bDhYXU0NCG6wmiE=
+sigs.k8s.io/controller-runtime v0.5.1/go.mod h1:Uojny7gvg55YLQnEGnPzRE3dC4ik2tRlZJgOUCWXAV4=
 sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802 h1:L6/8hETA7jvdx3xBcbDifrIN2xaYHE7tA58n+Kdp2Zw=
 sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802/go.mod h1:HIZ3PWUezpklcjkqpFbnYOqaqsAE1JeCTEwkgvPLXjk=
 sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
diff --git a/controllers/machinedeployment_sync_test.go b/controllers/machinedeployment_sync_test.go
index 7f71a5565..79974c130 100644
--- a/controllers/machinedeployment_sync_test.go
+++ b/controllers/machinedeployment_sync_test.go
@@ -28,8 +28,6 @@ import (
 )
 
 func TestMachineDeploymentSyncStatus(t *testing.T) {
-	g := NewWithT(t)
-
 	msStatusError := capierrors.MachineSetStatusError("some failure")
 
 	var tests = map[string]struct {
@@ -215,6 +213,8 @@ func TestMachineDeploymentSyncStatus(t *testing.T) {
 
 	for name, test := range tests {
 		t.Run(name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			actualStatus := calculateStatus(test.machineSets, test.newMachineSet, test.deployment)
 			g.Expect(actualStatus).To(Equal(test.expectedStatus))
 		})
diff --git a/controllers/machineset_controller_test.go b/controllers/machineset_controller_test.go
index f66e3339c..a245ee60a 100644
--- a/controllers/machineset_controller_test.go
+++ b/controllers/machineset_controller_test.go
@@ -511,8 +511,10 @@ func TestMachineSetToMachines(t *testing.T) {
 
 	for _, tc := range testsCases {
 		t.Run(tc.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			got := r.MachineToMachineSets(tc.mapObject)
-			g.Expect(got).To(Equal(tc.expected))
+			gs.Expect(got).To(Equal(tc.expected))
 		})
 	}
 }
diff --git a/controllers/mdutil/util_test.go b/controllers/mdutil/util_test.go
index 31a970be1..ffc765117 100644
--- a/controllers/mdutil/util_test.go
+++ b/controllers/mdutil/util_test.go
@@ -100,8 +100,6 @@ func generateMachineTemplateSpec(name string, annotations, labels map[string]str
 }
 
 func TestEqualMachineTemplate(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		Name           string
 		Former, Latter clusterv1.MachineTemplateSpec
@@ -253,6 +251,8 @@ func TestEqualMachineTemplate(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.Name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			runTest := func(t1, t2 *clusterv1.MachineTemplateSpec, reversed bool) {
 				// Run
 				equal := EqualMachineTemplate(t1, t2)
@@ -269,8 +269,6 @@ func TestEqualMachineTemplate(t *testing.T) {
 }
 
 func TestFindNewMachineSet(t *testing.T) {
-	g := NewWithT(t)
-
 	now := metav1.Now()
 	later := metav1.Time{Time: now.Add(time.Minute)}
 
@@ -316,6 +314,8 @@ func TestFindNewMachineSet(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.Name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			ms := FindNewMachineSet(&test.deployment, test.msList)
 			g.Expect(ms).To(Equal(test.expected))
 		})
@@ -323,8 +323,6 @@ func TestFindNewMachineSet(t *testing.T) {
 }
 
 func TestFindOldMachineSets(t *testing.T) {
-	g := NewWithT(t)
-
 	now := metav1.Now()
 	later := metav1.Time{Time: now.Add(time.Minute)}
 	before := metav1.Time{Time: now.Add(-time.Minute)}
@@ -398,6 +396,8 @@ func TestFindOldMachineSets(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.Name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			requireMS, allMS := FindOldMachineSets(&test.deployment, test.msList)
 			g.Expect(allMS).To(ConsistOf(test.expected))
 			// MSs are getting filtered correctly by ms.spec.replicas
@@ -407,8 +407,6 @@ func TestFindOldMachineSets(t *testing.T) {
 }
 
 func TestGetReplicaCountForMachineSets(t *testing.T) {
-	g := NewWithT(t)
-
 	ms1 := generateMS(generateDeployment("foo"))
 	*(ms1.Spec.Replicas) = 1
 	ms1.Status.Replicas = 2
@@ -438,6 +436,8 @@ func TestGetReplicaCountForMachineSets(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.Name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(GetReplicaCountForMachineSets(test.Sets)).To(Equal(test.ExpectedCount))
 			g.Expect(GetActualReplicaCountForMachineSets(test.Sets)).To(Equal(test.ExpectedActual))
 		})
@@ -445,8 +445,6 @@ func TestGetReplicaCountForMachineSets(t *testing.T) {
 }
 
 func TestResolveFenceposts(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		maxSurge          string
 		maxUnavailable    string
@@ -491,6 +489,8 @@ func TestResolveFenceposts(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run("maxSurge="+test.maxSurge, func(t *testing.T) {
+			g := NewWithT(t)
+
 			maxSurge := intstr.FromString(test.maxSurge)
 			maxUnavail := intstr.FromString(test.maxUnavailable)
 			surge, unavail, err := ResolveFenceposts(&maxSurge, &maxUnavail, test.desired)
@@ -506,8 +506,6 @@ func TestResolveFenceposts(t *testing.T) {
 }
 
 func TestNewMSNewReplicas(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		Name          string
 		strategyType  clusterv1.MachineDeploymentStrategyType
@@ -534,6 +532,8 @@ func TestNewMSNewReplicas(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.Name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			*(newDeployment.Spec.Replicas) = test.depReplicas
 			newDeployment.Spec.Strategy = &clusterv1.MachineDeploymentStrategy{Type: test.strategyType}
 			newDeployment.Spec.Strategy.RollingUpdate = &clusterv1.MachineRollingUpdateDeployment{
@@ -555,8 +555,6 @@ func TestNewMSNewReplicas(t *testing.T) {
 }
 
 func TestDeploymentComplete(t *testing.T) {
-	g := NewWithT(t)
-
 	deployment := func(desired, current, updated, available, maxUnavailable, maxSurge int32) *clusterv1.MachineDeployment {
 		return &clusterv1.MachineDeployment{
 			Spec: clusterv1.MachineDeploymentSpec{
@@ -626,14 +624,14 @@ func TestDeploymentComplete(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(DeploymentComplete(test.d, &test.d.Status)).To(Equal(test.expected))
 		})
 	}
 }
 
 func TestMaxUnavailable(t *testing.T) {
-	g := NewWithT(t)
-
 	deployment := func(replicas int32, maxUnavailable intstr.IntOrString) clusterv1.MachineDeployment {
 		return clusterv1.MachineDeployment{
 			Spec: clusterv1.MachineDeploymentSpec{
@@ -692,6 +690,8 @@ func TestMaxUnavailable(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(MaxUnavailable(test.deployment)).To(Equal(test.expected))
 		})
 	}
@@ -699,8 +699,6 @@ func TestMaxUnavailable(t *testing.T) {
 
 //Set of simple tests for annotation related util functions
 func TestAnnotationUtils(t *testing.T) {
-	g := NewWithT(t)
-
 	//Setup
 	tDeployment := generateDeployment("nginx")
 	tMS := generateMS(tDeployment)
@@ -709,6 +707,8 @@ func TestAnnotationUtils(t *testing.T) {
 
 	//Test Case 1: Check if anotations are copied properly from deployment to MS
 	t.Run("SetNewMachineSetAnnotations", func(t *testing.T) {
+		g := NewWithT(t)
+
 		//Try to set the increment revision from 1 through 20
 		for i := 0; i < 20; i++ {
 
@@ -721,6 +721,8 @@ func TestAnnotationUtils(t *testing.T) {
 
 	//Test Case 2:  Check if annotations are set properly
 	t.Run("SetReplicasAnnotations", func(t *testing.T) {
+		g := NewWithT(t)
+
 		g.Expect(SetReplicasAnnotations(&tMS, 10, 11)).To(BeTrue())
 		g.Expect(tMS.Annotations).To(HaveKeyWithValue(clusterv1.DesiredReplicasAnnotation, "10"))
 		g.Expect(tMS.Annotations).To(HaveKeyWithValue(clusterv1.MaxReplicasAnnotation, "11"))
@@ -733,14 +735,14 @@ func TestAnnotationUtils(t *testing.T) {
 	*tMS.Spec.Replicas = 1
 
 	t.Run("IsSaturated", func(t *testing.T) {
+		g := NewWithT(t)
+
 		g.Expect(IsSaturated(&tDeployment, &tMS)).To(BeTrue())
 	})
 	//Tear Down
 }
 
 func TestReplicasAnnotationsNeedUpdate(t *testing.T) {
-	g := NewWithT(t)
-
 	desiredReplicas := fmt.Sprintf("%d", int32(10))
 	maxReplicas := fmt.Sprintf("%d", int32(20))
 
@@ -805,6 +807,8 @@ func TestReplicasAnnotationsNeedUpdate(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(ReplicasAnnotationsNeedUpdate(test.machineSet, 10, 20)).To(Equal(test.expected))
 		})
 	}
diff --git a/controllers/noderefutil/providerid_test.go b/controllers/noderefutil/providerid_test.go
index 2f9ab241a..434100fc1 100644
--- a/controllers/noderefutil/providerid_test.go
+++ b/controllers/noderefutil/providerid_test.go
@@ -25,8 +25,6 @@ import (
 const aws = "aws"
 
 func TestNewProviderID(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		name       string
 		input      string
@@ -56,6 +54,8 @@ func TestNewProviderID(t *testing.T) {
 
 	for _, tc := range tests {
 		t.Run(tc.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			id, err := NewProviderID(tc.input)
 			g.Expect(err).NotTo(HaveOccurred())
 			g.Expect(id.CloudProvider()).To(Equal(aws))
@@ -65,8 +65,6 @@ func TestNewProviderID(t *testing.T) {
 }
 
 func TestInvalidProviderID(t *testing.T) {
-	g := NewWithT(t)
-
 	testCases := []struct {
 		name  string
 		input string
@@ -106,6 +104,8 @@ func TestInvalidProviderID(t *testing.T) {
 
 	for _, test := range testCases {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			_, err := NewProviderID(test.input)
 			g.Expect(err).To(MatchError(test.err))
 		})
diff --git a/controllers/noderefutil/util_test.go b/controllers/noderefutil/util_test.go
index 936af3618..5e4efba7e 100644
--- a/controllers/noderefutil/util_test.go
+++ b/controllers/noderefutil/util_test.go
@@ -27,8 +27,6 @@ import (
 )
 
 func TestIsNodeAvaialble(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		name              string
 		node              *corev1.Node
@@ -143,14 +141,14 @@ func TestIsNodeAvaialble(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(IsNodeAvailable(test.node, test.minReadySeconds, metav1.Now())).To(Equal(test.expectedAvailable))
 		})
 	}
 }
 
 func TestGetReadyCondition(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		name              string
 		nodeStatus        *corev1.NodeStatus
@@ -223,14 +221,14 @@ func TestGetReadyCondition(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(GetReadyCondition(test.nodeStatus)).To(Equal(test.expectedCondition))
 		})
 	}
 }
 
 func TestIsNodeReady(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		name          string
 		node          *corev1.Node
@@ -302,6 +300,8 @@ func TestIsNodeReady(t *testing.T) {
 
 	for _, test := range tests {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			g.Expect(IsNodeReady(test.node)).To(Equal(test.expectedReady))
 		})
 	}
diff --git a/controllers/remote/cluster_test.go b/controllers/remote/cluster_test.go
index 496dd4d3d..3413f7ea5 100644
--- a/controllers/remote/cluster_test.go
+++ b/controllers/remote/cluster_test.go
@@ -94,28 +94,33 @@ func TestNewClusterClient(t *testing.T) {
 	g.Expect(scheme.AddToScheme(testScheme)).To(Succeed())
 	ctx := context.Background()
 	t.Run("cluster with valid kubeconfig", func(t *testing.T) {
+		gs := NewWithT(t)
+
 		client := fake.NewFakeClientWithScheme(testScheme, validSecret)
 		_, err := NewClusterClient(ctx, client, clusterWithValidKubeConfig, testScheme)
 		// Since we do not have a remote server to connect to, we should expect to get
 		// an error to that effect for the purpose of this test.
-		g.Expect(err).To(MatchError(ContainSubstring("no such host")))
+		gs.Expect(err).To(MatchError(ContainSubstring("no such host")))
 
 		restConfig, err := RESTConfig(ctx, client, clusterWithValidKubeConfig)
-		g.Expect(err).NotTo(HaveOccurred())
-		g.Expect(restConfig.Host).To(Equal("https://test-cluster-api:6443"))
+		gs.Expect(err).NotTo(HaveOccurred())
+		gs.Expect(restConfig.Host).To(Equal("https://test-cluster-api:6443"))
 	})
 
 	t.Run("cluster with no kubeconfig", func(t *testing.T) {
+		gs := NewWithT(t)
+
 		client := fake.NewFakeClientWithScheme(testScheme)
 		_, err := NewClusterClient(ctx, client, clusterWithNoKubeConfig, testScheme)
-		g.Expect(err).To(MatchError(ContainSubstring("not found")))
+		gs.Expect(err).To(MatchError(ContainSubstring("not found")))
 	})
 
 	t.Run("cluster with invalid kubeconfig", func(t *testing.T) {
+		gs := NewWithT(t)
+
 		client := fake.NewFakeClientWithScheme(testScheme, invalidSecret)
 		_, err := NewClusterClient(ctx, client, clusterWithInvalidKubeConfig, testScheme)
-		g.Expect(err).To(HaveOccurred())
-		g.Expect(apierrors.IsNotFound(err)).To(BeFalse())
+		gs.Expect(err).To(HaveOccurred())
+		gs.Expect(apierrors.IsNotFound(err)).To(BeFalse())
 	})
-
 }
diff --git a/controlplane/kubeadm/internal/cluster_test.go b/controlplane/kubeadm/internal/cluster_test.go
index 8f9a6ed6a..f6512affb 100644
--- a/controlplane/kubeadm/internal/cluster_test.go
+++ b/controlplane/kubeadm/internal/cluster_test.go
@@ -49,8 +49,6 @@ type checkStaticPodReadyConditionTest struct {
 }
 
 func TestCheckStaticPodReadyCondition(t *testing.T) {
-	g := NewWithT(t)
-
 	table := []checkStaticPodReadyConditionTest{
 		{
 			name:       "pod is ready",
@@ -59,6 +57,8 @@ func TestCheckStaticPodReadyCondition(t *testing.T) {
 	}
 	for _, test := range table {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			pod := corev1.Pod{
 				ObjectMeta: metav1.ObjectMeta{
 					Name: "test-pod",
@@ -72,8 +72,6 @@ func TestCheckStaticPodReadyCondition(t *testing.T) {
 }
 
 func TestCheckStaticPodNotReadyCondition(t *testing.T) {
-	g := NewWithT(t)
-
 	table := []checkStaticPodReadyConditionTest{
 		{
 			name: "no pod status",
@@ -85,6 +83,8 @@ func TestCheckStaticPodNotReadyCondition(t *testing.T) {
 	}
 	for _, test := range table {
 		t.Run(test.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			pod := corev1.Pod{
 				ObjectMeta: metav1.ObjectMeta{
 					Name: "test-pod",
@@ -287,8 +287,6 @@ func (f *fakeClient) Update(_ context.Context, _ runtime.Object, _ ...client.Upd
 }
 
 func TestManagementCluster_healthCheck_NoError(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		name             string
 		machineList      *clusterv1.MachineList
@@ -318,6 +316,8 @@ func TestManagementCluster_healthCheck_NoError(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			ctx := context.Background()
 			m := &Management{
 				Client: &fakeClient{list: tt.machineList},
@@ -328,8 +328,6 @@ func TestManagementCluster_healthCheck_NoError(t *testing.T) {
 }
 
 func TestManagementCluster_healthCheck_Errors(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		name             string
 		machineList      *clusterv1.MachineList
@@ -426,6 +424,8 @@ func TestManagementCluster_healthCheck_Errors(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			ctx := context.Background()
 			clusterKey := client.ObjectKey{Namespace: "default", Name: "cluster-name"}
 			controlPlaneName := "control-plane-name"
@@ -472,9 +472,9 @@ func nilNodeRef(machine clusterv1.Machine) clusterv1.Machine {
 }
 
 func TestRemoveMemberForNode_ErrControlPlaneMinNodes(t *testing.T) {
-	g := NewWithT(t)
-
 	t.Run("do not remove the etcd member if the cluster has fewer than 2 control plane nodes", func(t *testing.T) {
+		g := NewWithT(t)
+
 		expectedErr := ErrControlPlaneMinNodes
 
 		workloadCluster := &Workload{
diff --git a/controlplane/kubeadm/internal/failure_domain_test.go b/controlplane/kubeadm/internal/failure_domain_test.go
index c6c58a7e4..83e5f52d7 100644
--- a/controlplane/kubeadm/internal/failure_domain_test.go
+++ b/controlplane/kubeadm/internal/failure_domain_test.go
@@ -84,8 +84,9 @@ func TestNewFailureDomainPicker(t *testing.T) {
 		},
 	}
 	for _, tc := range testcases {
-		g := NewWithT(t)
 		t.Run(tc.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			fd := PickFewest(tc.fds, tc.machines)
 			if tc.expected == nil {
 				g.Expect(fd).To(BeNil())
diff --git a/controlplane/kubeadm/internal/workload_cluster_test.go b/controlplane/kubeadm/internal/workload_cluster_test.go
index d2071c2ec..9184a1dbc 100644
--- a/controlplane/kubeadm/internal/workload_cluster_test.go
+++ b/controlplane/kubeadm/internal/workload_cluster_test.go
@@ -43,8 +43,6 @@ import (
 )
 
 func TestCluster_ReconcileKubeletRBACBinding_NoError(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		name   string
 		client ctrlclient.Client
@@ -73,6 +71,8 @@ func TestCluster_ReconcileKubeletRBACBinding_NoError(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			c := &Workload{
 				Client: tt.client,
 			}
@@ -83,8 +83,6 @@ func TestCluster_ReconcileKubeletRBACBinding_NoError(t *testing.T) {
 }
 
 func TestCluster_ReconcileKubeletRBACBinding_Error(t *testing.T) {
-	g := NewWithT(t)
-
 	tests := []struct {
 		name   string
 		client ctrlclient.Client
@@ -106,6 +104,8 @@ func TestCluster_ReconcileKubeletRBACBinding_Error(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			c := &Workload{
 				Client: tt.client,
 			}
@@ -146,9 +146,7 @@ func TestUpdateKubeProxyImageInfo(t *testing.T) {
 	g := NewWithT(t)
 
 	scheme := runtime.NewScheme()
-	if err := appsv1.AddToScheme(scheme); err != nil {
-		t.Fatalf("unable to setup scheme: %s", err)
-	}
+	g.Expect(appsv1.AddToScheme(scheme)).To(Succeed())
 
 	tests := []struct {
 		name        string
@@ -236,6 +234,8 @@ func TestUpdateKubeProxyImageInfo(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			gs := NewWithT(t)
+
 			objects := []runtime.Object{
 				&tt.ds,
 			}
@@ -245,15 +245,15 @@ func TestUpdateKubeProxyImageInfo(t *testing.T) {
 			}
 			err := w.UpdateKubeProxyImageInfo(ctx, tt.KCP)
 			if tt.expectErr {
-				g.Expect(err).To(HaveOccurred())
+				gs.Expect(err).To(HaveOccurred())
 			} else {
-				g.Expect(err).NotTo(HaveOccurred())
+				gs.Expect(err).NotTo(HaveOccurred())
 			}
 
 			proxyImage, err := getProxyImageInfo(ctx, w.Client)
-			g.Expect(err).NotTo(HaveOccurred())
+			gs.Expect(err).NotTo(HaveOccurred())
 			if tt.expectImage != "" {
-				g.Expect(proxyImage).To(Equal(tt.expectImage))
+				gs.Expect(proxyImage).To(Equal(tt.expectImage))
 			}
 		})
 	}
diff --git a/test/infrastructure/docker/cloudinit/runcmd_test.go b/test/infrastructure/docker/cloudinit/runcmd_test.go
index fc52dc64c..c043ae74d 100644
--- a/test/infrastructure/docker/cloudinit/runcmd_test.go
+++ b/test/infrastructure/docker/cloudinit/runcmd_test.go
@@ -42,8 +42,6 @@ runcmd:
 }
 
 func TestRunCmdRun(t *testing.T) {
-	g := NewWithT(t)
-
 	var useCases = []struct {
 		name         string
 		r            runCmd
@@ -77,6 +75,8 @@ func TestRunCmdRun(t *testing.T) {
 
 	for _, rt := range useCases {
 		t.Run(rt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			commands, err := rt.r.Commands()
 			g.Expect(err).NotTo(HaveOccurred())
 			g.Expect(rt.expectedCmds).To(Equal(commands))
diff --git a/test/infrastructure/docker/cloudinit/writefiles_test.go b/test/infrastructure/docker/cloudinit/writefiles_test.go
index b76b2f3fd..275cb4968 100644
--- a/test/infrastructure/docker/cloudinit/writefiles_test.go
+++ b/test/infrastructure/docker/cloudinit/writefiles_test.go
@@ -25,8 +25,6 @@ import (
 )
 
 func TestWriteFiles(t *testing.T) {
-	g := NewWithT(t)
-
 	var useCases = []struct {
 		name         string
 		w            writeFilesAction
@@ -89,6 +87,8 @@ func TestWriteFiles(t *testing.T) {
 
 	for _, rt := range useCases {
 		t.Run(rt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			cmds, err := rt.w.Commands()
 			g.Expect(err).NotTo(HaveOccurred())
 			g.Expect(rt.expectedCmds).To(Equal(cmds))
@@ -97,8 +97,6 @@ func TestWriteFiles(t *testing.T) {
 }
 
 func TestFixContent(t *testing.T) {
-	g := NewWithT(t)
-
 	v := "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 	gv, _ := gZipData([]byte(v))
 	var useCases = []struct {
@@ -129,6 +127,8 @@ func TestFixContent(t *testing.T) {
 
 	for _, rt := range useCases {
 		t.Run(rt.name, func(t *testing.T) {
+			g := NewWithT(t)
+
 			encoding := fixEncoding(rt.encoding)
 			c, err := fixContent(rt.content, encoding)
 			if rt.expectedError {
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml
index 7b55e32c3..8429c3754 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: dockerclusters.infrastructure.cluster.x-k8s.io
 spec:
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml
index 82f0f9730..224d43b1b 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: dockermachines.infrastructure.cluster.x-k8s.io
 spec:
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml
index 392ba77ed..25acc443e 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.2.8
+    controller-gen.kubebuilder.io/version: v0.2.6
   creationTimestamp: null
   name: dockermachinetemplates.infrastructure.cluster.x-k8s.io
 spec:
diff --git a/test/infrastructure/docker/go.mod b/test/infrastructure/docker/go.mod
index 86763f5c1..365c5b7d7 100644
--- a/test/infrastructure/docker/go.mod
+++ b/test/infrastructure/docker/go.mod
@@ -13,7 +13,7 @@ require (
 	k8s.io/client-go v0.17.2
 	k8s.io/klog v1.0.0
 	sigs.k8s.io/cluster-api v0.3.0-rc.2.0.20200302175844-3011d8c2580c
-	sigs.k8s.io/controller-runtime v0.5.2
+	sigs.k8s.io/controller-runtime v0.5.1
 	sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802
 	sigs.k8s.io/yaml v1.2.0
 )
diff --git a/test/infrastructure/docker/go.sum b/test/infrastructure/docker/go.sum
index d2dec9d31..72691bc25 100644
--- a/test/infrastructure/docker/go.sum
+++ b/test/infrastructure/docker/go.sum
@@ -577,8 +577,8 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
 modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
 modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
 modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
-sigs.k8s.io/controller-runtime v0.5.2 h1:pyXbUfoTo+HA3jeIfr0vgi+1WtmNh0CwlcnQGLXwsSw=
-sigs.k8s.io/controller-runtime v0.5.2/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A=
+sigs.k8s.io/controller-runtime v0.5.1 h1:TNidCfVoU/cs2i+9xoTcL/l7yhl0bDhYXU0NCG6wmiE=
+sigs.k8s.io/controller-runtime v0.5.1/go.mod h1:Uojny7gvg55YLQnEGnPzRE3dC4ik2tRlZJgOUCWXAV4=
 sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802 h1:L6/8hETA7jvdx3xBcbDifrIN2xaYHE7tA58n+Kdp2Zw=
 sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802/go.mod h1:HIZ3PWUezpklcjkqpFbnYOqaqsAE1JeCTEwkgvPLXjk=
 sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
diff --git a/test/infrastructure/docker/hack/tools/go.mod b/test/infrastructure/docker/hack/tools/go.mod
index f51b13977..de1b9616c 100644
--- a/test/infrastructure/docker/hack/tools/go.mod
+++ b/test/infrastructure/docker/hack/tools/go.mod
@@ -5,7 +5,7 @@ go 1.13
 require (
 	github.com/golangci/golangci-lint v1.23.8
 	sigs.k8s.io/cluster-api/hack/tools v0.0.0-20200130204219-ea93471ad47a
-	sigs.k8s.io/controller-tools v0.2.8
+	sigs.k8s.io/controller-tools v0.2.6
 )
 
 replace sigs.k8s.io/cluster-api/hack/tools => ../../../../../hack/tools
diff --git a/test/infrastructure/docker/hack/tools/go.sum b/test/infrastructure/docker/hack/tools/go.sum
index 88679a4cc..bf1e9c21e 100644
--- a/test/infrastructure/docker/hack/tools/go.sum
+++ b/test/infrastructure/docker/hack/tools/go.sum
@@ -710,8 +710,8 @@ mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphD
 mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
 mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4=
 mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
-sigs.k8s.io/controller-tools v0.2.8 h1:UmYsnu89dn8/wBhjKL3lkGyaDGRnPDYUx2+iwXRnylA=
-sigs.k8s.io/controller-tools v0.2.8/go.mod h1:9VKHPszmf2DHz/QmHkcfZoewO6BL7pPs9uAiBVsaJSE=
+sigs.k8s.io/controller-tools v0.2.6 h1:4Fo36alFw5+Fffz7HhNd2EFBFvckqVkb4ePnIj0uLUc=
+sigs.k8s.io/controller-tools v0.2.6/go.mod h1:9VKHPszmf2DHz/QmHkcfZoewO6BL7pPs9uAiBVsaJSE=
 sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20200226075303-ed8438ec10a4/go.mod h1:nyAxPBUS04gN3IRuEQ0elG4mVeto/d/qQRsW2PsyAy4=
 sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
 sigs.k8s.io/kustomize/api v0.3.2/go.mod h1:A+ATnlHqzictQfQC1q3KB/T6MSr0UWQsrrLxMWkge2E=