@@ -4,10 +4,10 @@ import (
44 "context"
55
66 . "github.com/onsi/ginkgo/v2"
7- // . "github.com/onsi/gomega"
7+ . "github.com/onsi/gomega"
88
9- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10- controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"
9+ // v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10+ // controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"
1111 "sigs.k8s.io/cluster-api/test/framework"
1212)
1313
@@ -33,8 +33,8 @@ var _ = Describe("Basic Cluster Creation", Ordered, func() {
3333
3434 ec := e2eCtx .NewE2ECluster (ClusterConfig {
3535 SpecName : "basic-cluster-creation" ,
36- NamespaceName : "random " ,
37- ClusterName : "random " ,
36+ NamespaceName : "simple " ,
37+ ClusterName : "simple " ,
3838 KubernetesVersion : "v1.34.1" ,
3939 ControlPlaneIP : "203.0.113.130" ,
4040 ControlPlaneMachineCount : 1 ,
@@ -47,27 +47,44 @@ var _ = Describe("Basic Cluster Creation", Ordered, func() {
4747 ec .GenerateAndApplyClusterTemplate (ctx )
4848
4949 By ("Wait for cluster" )
50- framework .DiscoveryAndWaitForCluster (ctx , framework.DiscoveryAndWaitForClusterInput {
50+ cluster := framework .DiscoveryAndWaitForCluster (ctx , framework.DiscoveryAndWaitForClusterInput {
5151 Namespace : ec .NamespaceName ,
5252 Name : ec .ClusterName ,
5353 Getter : e2eCtx .Environment .Bootstrap .GetClient (),
54- })
54+ }, e2eCtx . E2EConfig . GetIntervals ( "default" , "wait-cluster" ) ... )
5555
56- framework .WaitForControlPlaneToBeReady (ctx , framework.WaitForControlPlaneToBeReadyInput {
57- Getter : e2eCtx .Environment .Bootstrap .GetClient (),
58- ControlPlane : & controlplanev1.KubeadmControlPlane {
59- ObjectMeta : v1.ObjectMeta {
60- Name : ec .ClusterName ,
61- Namespace : ec .NamespaceName ,
62- },
63- },
56+ controlPlane := framework .GetKubeadmControlPlaneByCluster (ctx , framework.GetKubeadmControlPlaneByClusterInput {
57+ Lister : e2eCtx .Environment .Bootstrap .GetClient (),
58+ ClusterName : cluster .Name ,
59+ Namespace : cluster .Namespace ,
6460 })
6561
62+ Expect (controlPlane ).To (Not (BeNil ()))
63+
64+ // framework.WaitForKubeadmControlPlaneMachinesToExist(ctx, framework.WaitForKubeadmControlPlaneMachinesToExistInput{
65+ // Lister: e2eCtx.Environment.Bootstrap.GetClient(),
66+ // Cluster: cluster,
67+ // ControlPlane: controlPlane,
68+ // }, e2eCtx.E2EConfig.GetIntervals("default", "wait-control-plane")...)
69+ // framework.DiscoveryAndWaitForControlPlaneInitialized(ctx, framework.DiscoveryAndWaitForControlPlaneInitializedInput{
70+ // Lister: e2eCtx.Environment.Bootstrap.GetClient(),
71+ // Cluster: cluster,
72+ // }, e2eCtx.E2EConfig.GetIntervals("default", "wait-control-plane")...)
73+
74+ // By("Wait for control plane")
75+ // framework.WaitForControlPlaneToBeReady(ctx, framework.WaitForControlPlaneToBeReadyInput{
76+ // Getter: e2eCtx.Environment.Bootstrap.GetClient(),
77+ // ControlPlane: &controlplanev1.KubeadmControlPlane{
78+ // ObjectMeta: v1.ObjectMeta{
79+ // Name: ec.ClusterName,
80+ // Namespace: ec.NamespaceName,
81+ // },
82+ // },
83+ // }, e2eCtx.E2EConfig.GetIntervals("default", "wait-control-plane")...)
84+
6685 })
6786
6887 AfterAll (func () {
69- if e2eCtx .Environment .ClusterProvider != nil {
70- e2eCtx .Environment .ClusterProvider .Dispose (context .TODO ())
71- }
88+ e2eCtx .Teardown (context .TODO ())
7289 })
7390})
0 commit comments