Skip to content

Commit 9f8cbfe

Browse files
committed
Remove unnesasery methods
1 parent 5d11bea commit 9f8cbfe

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

test/component_test.go

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ import (
2222
"k8s.io/apimachinery/pkg/runtime/schema"
2323
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
2424

25-
"k8s.io/client-go/informers"
26-
"sync/atomic"
27-
corev1 "k8s.io/api/core/v1"
28-
2925
"k8s.io/client-go/dynamic"
3026
"k8s.io/client-go/dynamic/dynamicinformer"
3127
"k8s.io/client-go/tools/cache"
@@ -44,38 +40,6 @@ func (s *ComponentSuite) TestBasic() {
4440
clusrerId := atmos.Output(s.T(), clusterOptions, "eks_cluster_id")
4541
cluster := awsHelper.GetEksCluster(s.T(), context.Background(), awsRegion, clusrerId)
4642

47-
clientset, err := awsHelper.NewK8SClientset(cluster)
48-
assert.NoError(s.T(), err)
49-
50-
factoryCluster := informers.NewSharedInformerFactory(clientset, 0)
51-
informerCluster := factoryCluster.Core().V1().Nodes().Informer()
52-
stopChannelCluster := make(chan struct{})
53-
var countOfWorkerNodes uint64 = 0
54-
55-
informerCluster.AddEventHandler(cache.ResourceEventHandlerFuncs{
56-
AddFunc: func(obj interface{}) {
57-
node := obj.(*corev1.Node)
58-
fmt.Printf("Worker Node %s has joined the EKS cluster at %s\n", node.Name, node.CreationTimestamp)
59-
atomic.AddUint64(&countOfWorkerNodes, 1)
60-
if countOfWorkerNodes > 1 {
61-
close(stopChannelCluster)
62-
}
63-
},
64-
})
65-
66-
go informerCluster.Run(stopChannelCluster)
67-
68-
select {
69-
case <-stopChannelCluster:
70-
msg := "All worker nodes have joined the EKS cluster"
71-
fmt.Println(msg)
72-
case <-time.After(5 * time.Minute):
73-
msg := "Not all worker nodes have joined the EKS cluster"
74-
fmt.Println(msg)
75-
assert.Fail(s.T(), msg)
76-
}
77-
78-
7943
dnsDelegatedOptions := s.GetAtmosOptions("dns-delegated", stack, nil)
8044
delegatedDomainName := atmos.Output(s.T(), dnsDelegatedOptions, "default_domain_name")
8145
defaultDNSZoneId := atmos.Output(s.T(), dnsDelegatedOptions, "default_dns_zone_id")

0 commit comments

Comments
 (0)