Skip to content

Commit 12432c0

Browse files
committed
fix lint
Signed-off-by: sivchari <[email protected]>
1 parent 671164e commit 12432c0

File tree

3 files changed

+6
-54
lines changed

3 files changed

+6
-54
lines changed

test/e2e/clusterctl_upgrade.go

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -811,53 +811,6 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
811811
})
812812
}
813813

814-
// verifyV1Beta2ConditionsTrueV1Beta1 checks the Cluster and Machines of a Cluster that
815-
// the given v1beta2 condition types are set to true without a message, if they exist.
816-
func verifyV1Beta2ConditionsTrueV1Beta1(ctx context.Context, c client.Client, clusterName, clusterNamespace string, v1beta2conditionTypes []string) {
817-
cluster := &clusterv1beta1.Cluster{}
818-
key := client.ObjectKey{
819-
Namespace: clusterNamespace,
820-
Name: clusterName,
821-
}
822-
Eventually(func() error {
823-
return c.Get(ctx, key, cluster)
824-
}, 3*time.Minute, 3*time.Second).Should(Succeed(), "Failed to get Cluster object %s", klog.KRef(clusterNamespace, clusterName))
825-
826-
if cluster.Status.V1Beta2 != nil && len(cluster.Status.V1Beta2.Conditions) > 0 {
827-
for _, conditionType := range v1beta2conditionTypes {
828-
for _, condition := range cluster.Status.V1Beta2.Conditions {
829-
if condition.Type != conditionType {
830-
continue
831-
}
832-
Expect(condition.Status).To(Equal(metav1.ConditionTrue), "The v1beta2 condition %q on the Cluster should be set to true", conditionType)
833-
Expect(condition.Message).To(BeEmpty(), "The v1beta2 condition %q on the Cluster should have an empty message", conditionType)
834-
}
835-
}
836-
}
837-
838-
machineList := &clusterv1beta1.MachineList{}
839-
Eventually(func() error {
840-
return c.List(ctx, machineList, client.InNamespace(clusterNamespace),
841-
client.MatchingLabels{
842-
clusterv1.ClusterNameLabel: clusterName,
843-
})
844-
}, 3*time.Minute, 3*time.Second).Should(Succeed(), "Failed to list Machines for Cluster %s", klog.KObj(cluster))
845-
for _, machine := range machineList.Items {
846-
if machine.Status.V1Beta2 == nil || len(machine.Status.V1Beta2.Conditions) == 0 {
847-
continue
848-
}
849-
for _, conditionType := range v1beta2conditionTypes {
850-
for _, condition := range machine.Status.V1Beta2.Conditions {
851-
if condition.Type != conditionType {
852-
continue
853-
}
854-
Expect(condition.Status).To(Equal(metav1.ConditionTrue), "The v1beta2 condition %q on the Machine %q should be set to true", conditionType, machine.Name)
855-
Expect(condition.Message).To(BeEmpty(), "The v1beta2 condition %q on the Machine %q should have an empty message", conditionType, machine.Name)
856-
}
857-
}
858-
}
859-
}
860-
861814
func setupClusterctl(ctx context.Context, clusterctlBinaryURL, clusterctlConfigPath string) (string, string) {
862815
clusterctlBinaryPath := downloadToTmpFile(ctx, clusterctlBinaryURL)
863816

test/e2e/common.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,3 @@ func GetLatestReleaseOfMinor(ctx context.Context, minorRelease string) (string,
8282
releaseMarker := fmt.Sprintf(latestReleaseMarkerPrefix, minorRelease)
8383
return clusterctl.ResolveRelease(ctx, releaseMarker)
8484
}
85-

test/e2e/machine_pool.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
corev1 "k8s.io/api/core/v1"
3131
"k8s.io/utils/ptr"
3232

33-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2"
3433
"sigs.k8s.io/cluster-api/test/framework"
3534
"sigs.k8s.io/cluster-api/test/framework/clusterctl"
3635
"sigs.k8s.io/cluster-api/util"
@@ -142,15 +141,16 @@ func MachinePoolSpec(ctx context.Context, inputGetter func() MachinePoolInput) {
142141

143142
Byf("Verify Cluster Available condition is true")
144143
framework.VerifyClusterAvailable(ctx, framework.VerifyClusterAvailableInput{
145-
Getter: input.BootstrapClusterProxy.GetClient(),
146-
Cluster: clusterResources.Cluster,
144+
Getter: input.BootstrapClusterProxy.GetClient(),
145+
Name: clusterResources.Cluster.Name,
146+
Namespace: clusterResources.Cluster.Namespace,
147147
})
148148

149149
Byf("Verify Machines Ready condition is true")
150150
framework.VerifyMachinesReady(ctx, framework.VerifyMachinesReadyInput{
151-
Lister: input.BootstrapClusterProxy.GetClient(),
152-
ClusterName: clusterResources.Cluster.Name,
153-
Namespace: clusterResources.Cluster.Namespace,
151+
Lister: input.BootstrapClusterProxy.GetClient(),
152+
Name: clusterResources.Cluster.Name,
153+
Namespace: clusterResources.Cluster.Namespace,
154154
})
155155

156156
By("PASSED!")

0 commit comments

Comments
 (0)