Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions api/v1beta1/gcpcluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v1beta1

import (
"context"
"testing"

. "github.com/onsi/gomega"
Expand Down Expand Up @@ -90,7 +89,7 @@ func TestGCPCluster_ValidateUpdate(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
t.Parallel()
warn, err := (&gcpClusterWebhook{}).ValidateUpdate(context.Background(), test.oldCluster, test.newCluster)
warn, err := (&gcpClusterWebhook{}).ValidateUpdate(t.Context(), test.oldCluster, test.newCluster)
if test.wantErr {
g.Expect(err).To(HaveOccurred())
} else {
Expand Down
3 changes: 1 addition & 2 deletions api/v1beta1/gcpclustertemplate_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v1beta1

import (
"context"
"testing"

. "github.com/onsi/gomega"
Expand Down Expand Up @@ -84,7 +83,7 @@ func TestGCPClusterTemplate_ValidateUpdate(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
t.Parallel()
warn, err := (&gcpClusterTemplateWebhook{}).ValidateUpdate(context.Background(), test.oldTemplate, test.newTemplate)
warn, err := (&gcpClusterTemplateWebhook{}).ValidateUpdate(t.Context(), test.oldTemplate, test.newTemplate)
if test.wantErr {
g.Expect(err).To(HaveOccurred())
} else {
Expand Down
3 changes: 1 addition & 2 deletions api/v1beta1/gcpmachine_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v1beta1

import (
"context"
"testing"

. "github.com/onsi/gomega"
Expand Down Expand Up @@ -273,7 +272,7 @@ func TestGCPMachine_ValidateCreate(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
t.Parallel()
warn, err := (&gcpMachineWebhook{}).ValidateCreate(context.Background(), test.GCPMachine)
warn, err := (&gcpMachineWebhook{}).ValidateCreate(t.Context(), test.GCPMachine)
if test.wantErr {
g.Expect(err).To(HaveOccurred())
} else {
Expand Down
3 changes: 1 addition & 2 deletions api/v1beta1/gcpmachinetemplate_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v1beta1

import (
"context"
"testing"

. "github.com/onsi/gomega"
Expand Down Expand Up @@ -233,7 +232,7 @@ func TestGCPMachineTemplate_ValidateCreate(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
t.Parallel()
warn, err := (&gcpMachineTemplateWebhook{}).ValidateCreate(context.Background(), test.template)
warn, err := (&gcpMachineTemplateWebhook{}).ValidateCreate(t.Context(), test.template)
if test.wantErr {
g.Expect(err).To(HaveOccurred())
} else {
Expand Down
3 changes: 1 addition & 2 deletions exp/api/v1beta1/gcpmanagedcluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v1beta1

import (
"context"
"testing"

. "github.com/onsi/gomega"
Expand Down Expand Up @@ -101,7 +100,7 @@ func TestGCPManagedClusterValidatingWebhookUpdate(t *testing.T) {
},
}

warn, err := (&gcpManagedClusterWebhook{}).ValidateUpdate(context.Background(), oldMC, newMC)
warn, err := (&gcpManagedClusterWebhook{}).ValidateUpdate(t.Context(), oldMC, newMC)

if tc.expectError {
g.Expect(err).To(HaveOccurred())
Expand Down
7 changes: 3 additions & 4 deletions exp/api/v1beta1/gcpmanagedcontrolplane_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v1beta1

import (
"context"
"strings"
"testing"

Expand Down Expand Up @@ -110,7 +109,7 @@ func TestGCPManagedControlPlaneDefaultingWebhook(t *testing.T) {
},
Spec: tc.spec,
}
err := (&gcpManagedControlPlaneWebhook{}).Default(context.Background(), mcp)
err := (&gcpManagedControlPlaneWebhook{}).Default(t.Context(), mcp)
g.Expect(err).NotTo(HaveOccurred())

g.Expect(mcp.Spec).ToNot(BeNil())
Expand Down Expand Up @@ -193,7 +192,7 @@ func TestGCPManagedControlPlaneValidatingWebhookCreate(t *testing.T) {
mcp := &GCPManagedControlPlane{
Spec: tc.spec,
}
warn, err := (&gcpManagedControlPlaneWebhook{}).ValidateCreate(context.Background(), mcp)
warn, err := (&gcpManagedControlPlaneWebhook{}).ValidateCreate(t.Context(), mcp)

if tc.expectError {
g.Expect(err).To(HaveOccurred())
Expand Down Expand Up @@ -288,7 +287,7 @@ func TestGCPManagedControlPlaneValidatingWebhookUpdate(t *testing.T) {
},
}

warn, err := (&gcpManagedControlPlaneWebhook{}).ValidateUpdate(context.Background(), oldMCP, newMCP)
warn, err := (&gcpManagedControlPlaneWebhook{}).ValidateUpdate(t.Context(), oldMCP, newMCP)

if tc.expectError {
g.Expect(err).To(HaveOccurred())
Expand Down
5 changes: 2 additions & 3 deletions exp/api/v1beta1/gcpmanagedmachinepool_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v1beta1

import (
"context"
"strings"
"testing"

Expand Down Expand Up @@ -148,7 +147,7 @@ func TestGCPManagedMachinePoolValidatingWebhookCreate(t *testing.T) {
mmp := &GCPManagedMachinePool{
Spec: tc.spec,
}
warn, err := (&gcpManagedMachinePoolWebhook{}).ValidateCreate(context.Background(), mmp)
warn, err := (&gcpManagedMachinePoolWebhook{}).ValidateCreate(t.Context(), mmp)

if tc.expectError {
g.Expect(err).To(HaveOccurred())
Expand Down Expand Up @@ -215,7 +214,7 @@ func TestGCPManagedMachinePoolValidatingWebhookUpdate(t *testing.T) {
},
}

warn, err := (&gcpManagedMachinePoolWebhook{}).ValidateUpdate(context.Background(), oldMMP, newMMP)
warn, err := (&gcpManagedMachinePoolWebhook{}).ValidateUpdate(t.Context(), oldMMP, newMMP)

if tc.expectError {
g.Expect(err).To(HaveOccurred())
Expand Down