Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arshadd-b committed Jan 24, 2025
1 parent 5e33401 commit 2f617f5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions controlplane/kubeadm/internal/control_plane_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,12 @@ func TestControlPlane(t *testing.T) {
g.Expect(fd).To(BeNil())
})

t.Run("ControlPlane returns infra error", func(t *testing.T) {
t.Run("ControlPlane returns error when getting infra resources", func(t *testing.T) {
g := NewWithT(t)
cluster := clusterv1.Cluster{
Status: clusterv1.ClusterStatus{
FailureDomains: clusterv1.FailureDomains{
"one": failureDomain(true),
"two": failureDomain(true),
"three": failureDomain(true),
"one": failureDomain(true),
},
},
}
Expand All @@ -213,7 +211,7 @@ func TestControlPlane(t *testing.T) {
g.Expect(err).To(HaveOccurred())
})

t.Run("When infra and bootstrap config is exists", func(t *testing.T) {
t.Run("When infra and bootstrap config exists", func(t *testing.T) {
g := NewWithT(t)
ns, err := env.CreateNamespace(ctx, "test-machine-watches")
kcp := &controlplanev1.KubeadmControlPlane{
Expand Down Expand Up @@ -583,8 +581,9 @@ func TestMachineWithDeleteAnnotation(t *testing.T) {
}

g := NewWithT(t)
annotedMachines := c.MachineWithDeleteAnnotation(machines)
g.Expect(annotedMachines).NotTo(BeNil())
annotatedMachines := c.MachineWithDeleteAnnotation(machines)
g.Expect(annotatedMachines).NotTo(BeNil())
g.Expect(annotatedMachines.Len()).To(BeEquivalentTo(2))
})
}

Expand Down

0 comments on commit 2f617f5

Please sign in to comment.