Skip to content

Commit

Permalink
Update homebrew to point to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
panktishah26 committed Nov 27, 2023
1 parent df2b28a commit 3d8d024
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 104 deletions.
76 changes: 41 additions & 35 deletions pkg/providers/cloudstack/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,27 @@ func TestReconcilerReconcileSuccess(t *testing.T) {
// We want to check that the cluster status is cleaned up if validations are passed
tt.cluster.SetFailure(anywherev1.FailureReasonType("InvalidCluster"), "invalid cluster")

tt.eksaSupportObjs = append(tt.eksaSupportObjs, tt.secret, tt.kcp)
kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = tt.cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", tt.cluster.Name),
},
},
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
ObservedGeneration: 2,
}
})
tt.eksaSupportObjs = append(tt.eksaSupportObjs, tt.secret, kcp)
tt.createAllObjs()

logger := test.NewNullLogger()
Expand Down Expand Up @@ -178,17 +198,27 @@ func TestReconcilerControlPlaneIsNotReady(t *testing.T) {

tt := newReconcilerTest(t)

tt.kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.NewTime(time.Now()),
kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = tt.cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", tt.cluster.Name),
},
},
},
ObservedGeneration: 2,
}
tt.eksaSupportObjs = append(tt.eksaSupportObjs, tt.kcp, tt.secret)
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
ObservedGeneration: 2,
}
})
tt.eksaSupportObjs = append(tt.eksaSupportObjs, kcp, tt.secret)
tt.createAllObjs()

logger := test.NewNullLogger()
Expand Down Expand Up @@ -542,7 +572,6 @@ type reconcilerTest struct {
validatorRegistry *cloudstack.MockValidatorRegistry
execConfig *decoder.CloudStackExecConfig
secret *corev1.Secret
kcp *controlplanev1.KubeadmControlPlane
}

func newReconcilerTest(t testing.TB) *reconcilerTest {
Expand Down Expand Up @@ -647,28 +676,6 @@ func newReconcilerTest(t testing.TB) *reconcilerTest {

c.Spec.EksaVersion = &version
})

kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", cluster.Name),
},
},
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
ObservedGeneration: 2,
}
})

secret := &corev1.Secret{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Expand Down Expand Up @@ -710,7 +717,6 @@ func newReconcilerTest(t testing.TB) *reconcilerTest {
validatorRegistry: validatorRegistry,
execConfig: execConfig,
secret: secret,
kcp: kcp,
}

t.Cleanup(tt.cleanup)
Expand Down
74 changes: 40 additions & 34 deletions pkg/providers/snow/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,27 @@ func TestReconcilerReconcileSuccess(t *testing.T) {
tt := newReconcilerTest(t)
// We want to check that the cluster status is cleaned up if validations are passed
tt.cluster.SetFailure(anywherev1.FailureReasonType("InvalidCluster"), "invalid cluster")

tt.eksaSupportObjs = append(tt.eksaSupportObjs, tt.kcp)
kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = tt.cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", tt.cluster.Name),
},
},
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
ObservedGeneration: 2,
}
})
tt.eksaSupportObjs = append(tt.eksaSupportObjs, kcp)
tt.createAllObjs()

logger := test.NewNullLogger()
Expand Down Expand Up @@ -230,16 +249,26 @@ func TestReconcilerReconcileControlPlane(t *testing.T) {

func TestReconcilerCheckControlPlaneReadyItIsReady(t *testing.T) {
tt := newReconcilerTest(t)
tt.kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.NewTime(time.Now()),
kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = tt.cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", tt.cluster.Name),
},
},
},
}
tt.eksaSupportObjs = append(tt.eksaSupportObjs, tt.kcp)
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
}
})
tt.eksaSupportObjs = append(tt.eksaSupportObjs, kcp)
tt.withFakeClient()

result, err := tt.reconciler().CheckControlPlaneReady(tt.ctx, test.NewNullLogger(), tt.buildSpec())
Expand Down Expand Up @@ -304,7 +333,6 @@ type reconcilerTest struct {
eksaSupportObjs []client.Object
machineConfigControlPlane *anywherev1.SnowMachineConfig
machineConfigWorker *anywherev1.SnowMachineConfig
kcp *controlplanev1.KubeadmControlPlane
}

func newReconcilerTest(t testing.TB) *reconcilerTest {
Expand Down Expand Up @@ -394,27 +422,6 @@ func newReconcilerTest(t testing.TB) *reconcilerTest {
c.Spec.EksaVersion = &version
})

kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", cluster.Name),
},
},
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
ObservedGeneration: 2,
}
})

tt := &reconcilerTest{
t: t,
WithT: NewWithT(t),
Expand All @@ -439,7 +446,6 @@ func newReconcilerTest(t testing.TB) *reconcilerTest {
cluster: cluster,
machineConfigControlPlane: machineConfigCP,
machineConfigWorker: machineConfigWN,
kcp: kcp,
}

t.Cleanup(tt.cleanup)
Expand Down
75 changes: 41 additions & 34 deletions pkg/providers/vsphere/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,27 @@ func TestReconcilerReconcileSuccess(t *testing.T) {
// We want to check that the cluster status is cleaned up if validations are passed
tt.cluster.SetFailure(anywherev1.FailureReasonType("InvalidCluster"), "invalid cluster")

tt.eksaSupportObjs = append(tt.eksaSupportObjs, tt.kcp)
kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = tt.cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", tt.cluster.Name),
},
},
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
ObservedGeneration: 2,
}
})
tt.eksaSupportObjs = append(tt.eksaSupportObjs, kcp)
tt.createAllObjs()

logger := test.NewNullLogger()
Expand Down Expand Up @@ -169,18 +189,28 @@ func TestReconcilerControlPlaneIsNotReady(t *testing.T) {
t.Skip("Flaky (https://github.com/aws/eks-anywhere/issues/7000)")

tt := newReconcilerTest(t)
tt.kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.NewTime(time.Now()),
kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = tt.cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", tt.cluster.Name),
},
},
},
ObservedGeneration: 2,
}
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
ObservedGeneration: 2,
}
})

tt.eksaSupportObjs = append(tt.eksaSupportObjs, tt.kcp)
tt.eksaSupportObjs = append(tt.eksaSupportObjs, kcp)
tt.createAllObjs()

logger := test.NewNullLogger()
Expand Down Expand Up @@ -352,7 +382,6 @@ type reconcilerTest struct {
machineConfigControlPlane *anywherev1.VSphereMachineConfig
machineConfigWorker *anywherev1.VSphereMachineConfig
ipValidator *vspherereconcilermocks.MockIPValidator
kcp *controlplanev1.KubeadmControlPlane
}

func newReconcilerTest(t testing.TB) *reconcilerTest {
Expand Down Expand Up @@ -440,27 +469,6 @@ func newReconcilerTest(t testing.TB) *reconcilerTest {
c.Spec.EksaVersion = &version
})

kcp := test.KubeadmControlPlane(func(kcp *controlplanev1.KubeadmControlPlane) {
kcp.Name = cluster.Name
kcp.Spec = controlplanev1.KubeadmControlPlaneSpec{
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
InfrastructureRef: corev1.ObjectReference{
Name: fmt.Sprintf("%s-control-plane-1", cluster.Name),
},
},
}
kcp.Status = controlplanev1.KubeadmControlPlaneStatus{
Conditions: clusterv1.Conditions{
{
Type: clusterapi.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
ObservedGeneration: 2,
}
})

tt := &reconcilerTest{
t: t,
WithT: NewWithT(t),
Expand Down Expand Up @@ -489,7 +497,6 @@ func newReconcilerTest(t testing.TB) *reconcilerTest {
datacenterConfig: workloadClusterDatacenter,
machineConfigControlPlane: machineConfigCP,
machineConfigWorker: machineConfigWN,
kcp: kcp,
}

t.Cleanup(tt.cleanup)
Expand Down
2 changes: 1 addition & 1 deletion release/triggers/brew-version-release/CLI_RELEASE_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.18.1
v0.18.2

0 comments on commit 3d8d024

Please sign in to comment.