Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CecileRobertMichon committed Nov 3, 2023
1 parent 4b6c4c2 commit ba851e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions controllers/azurejson_machinepool_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestAzureJSONPoolReconciler(t *testing.T) {
azureMachinePool,
},
fail: true,
err: "azureclusters.infrastructure.cluster.x-k8s.io \"my-azure-cluster\" not found",
err: "failed to create cluster scope for cluster /my-cluster: azureclusters.infrastructure.cluster.x-k8s.io \"my-azure-cluster\" not found",
},
"infra ref is nil": {
objects: []runtime.Object{
Expand Down Expand Up @@ -173,7 +173,8 @@ func TestAzureJSONPoolReconciler(t *testing.T) {
machinePool,
azureMachinePool,
},
fail: false,
fail: true,
err: "failed to create cluster scope for cluster /my-cluster: unsupported infrastructure type \"FooCluster\", should be AzureCluster or AzureManagedCluster",
},
}

Expand Down
5 changes: 3 additions & 2 deletions exp/controllers/azuremachinepoolmachine_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ func getAReadyMachinePoolMachineCluster() (*clusterv1.Cluster, *infrav1.AzureClu
},
Spec: clusterv1.ClusterSpec{
InfrastructureRef: &corev1.ObjectReference{
Name: azCluster.Name,
Kind: "AzureCluster",
Name: azCluster.Name,
Namespace: "default",
Kind: "AzureCluster",
},
},
Status: clusterv1.ClusterStatus{
Expand Down

0 comments on commit ba851e4

Please sign in to comment.