Skip to content

Commit

Permalink
test: remove unused t reference in createAzureCluster func
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed May 4, 2020
1 parent 11e2685 commit d65fdfb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions api/v1alpha3/azurecluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ func TestAzureCluster_ValidateUpdate(t *testing.T) {
}{
{
name: "no change",
cluster: createAzureCluster(t, "westus2"),
updated: createAzureCluster(t, "westus2"),
cluster: createAzureCluster("westus2"),
updated: createAzureCluster("westus2"),
err: nil,
},
{
name: "update location should throw an error",
cluster: createAzureCluster(t, "westus2"),
updated: createAzureCluster(t, "eastus"),
cluster: createAzureCluster("westus2"),
updated: createAzureCluster("eastus"),
err: apierrors.NewInvalid(
GroupVersion.WithKind("AzureCluster").GroupKind(),
"westus2", field.ErrorList{
Expand All @@ -53,6 +53,7 @@ func TestAzureCluster_ValidateUpdate(t *testing.T) {
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
err := tc.cluster.ValidateUpdate(tc.updated)
if tc.err != nil {
g.Expect(err).To(HaveOccurred())
Expand All @@ -64,7 +65,7 @@ func TestAzureCluster_ValidateUpdate(t *testing.T) {
}
}

func createAzureCluster(t *testing.T, location string) *AzureCluster {
func createAzureCluster(location string) *AzureCluster {
return &AzureCluster{
Spec: AzureClusterSpec{
Location: location,
Expand Down

0 comments on commit d65fdfb

Please sign in to comment.