@@ -99,7 +99,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
99
99
100
100
ginkgo .It ("deployment failover testing" , func () {
101
101
var disabledClusters []string
102
- targetClusterNames := framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
102
+ targetClusterNames := framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
103
103
104
104
ginkgo .By (fmt .Sprintf ("add taint %v to the random one cluster" , framework .NotReadyTaintTemplate ), func () {
105
105
temp := numOfFailedClusters
@@ -116,7 +116,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
116
116
117
117
ginkgo .By ("check whether deployment of failed cluster is rescheduled to other available cluster" , func () {
118
118
gomega .Eventually (func () int {
119
- targetClusterNames = framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
119
+ targetClusterNames = framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
120
120
for _ , targetClusterName := range targetClusterNames {
121
121
// the target cluster should be overwritten to another available cluster
122
122
if ! testhelper .IsExclude (targetClusterName , disabledClusters ) {
@@ -203,7 +203,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
203
203
204
204
ginkgo .It ("taint Cluster with NoExecute taint" , func () {
205
205
var disabledClusters []string
206
- targetClusterNames := framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
206
+ targetClusterNames := framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
207
207
ginkgo .By (fmt .Sprintf ("add taint %v to the random one cluster" , taint ), func () {
208
208
temp := numOfFailedClusters
209
209
for _ , targetClusterName := range targetClusterNames {
@@ -219,7 +219,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
219
219
220
220
ginkgo .By ("check whether deployment of taint cluster is rescheduled to other available cluster" , func () {
221
221
gomega .Eventually (func () int {
222
- targetClusterNames = framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
222
+ targetClusterNames = framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
223
223
for _ , targetClusterName := range targetClusterNames {
224
224
// the target cluster should be overwritten to another available cluster
225
225
if ! testhelper .IsExclude (targetClusterName , disabledClusters ) {
@@ -312,7 +312,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
312
312
})
313
313
314
314
ginkgo .It ("application failover with purgeMode graciously when the application come back to healthy on the new cluster" , func () {
315
- disabledClusters := framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
315
+ disabledClusters := framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
316
316
ginkgo .By ("create an error op" , func () {
317
317
overridePolicy = testhelper .NewOverridePolicyByOverrideRules (policyNamespace , policyName , []policyv1alpha1.ResourceSelector {
318
318
{
@@ -357,7 +357,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
357
357
358
358
ginkgo .By ("check whether the failed deployment is rescheduled to other available cluster" , func () {
359
359
gomega .Eventually (func () int {
360
- targetClusterNames := framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
360
+ targetClusterNames := framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
361
361
for _ , targetClusterName := range targetClusterNames {
362
362
// the target cluster should be overwritten to another available cluster
363
363
if ! testhelper .IsExclude (targetClusterName , disabledClusters ) {
@@ -388,7 +388,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
388
388
framework .PatchPropagationPolicy (karmadaClient , policy .Namespace , policy .Name , patch , types .JSONPatchType )
389
389
})
390
390
391
- disabledClusters := framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
391
+ disabledClusters := framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
392
392
var beginTime time.Time
393
393
ginkgo .By ("create an error op" , func () {
394
394
overridePolicy = testhelper .NewOverridePolicyByOverrideRules (policyNamespace , policyName , []policyv1alpha1.ResourceSelector {
@@ -503,7 +503,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
503
503
})
504
504
505
505
ginkgo .It ("application failover with purgeMode never" , func () {
506
- disabledClusters := framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
506
+ disabledClusters := framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
507
507
ginkgo .By ("create an error op" , func () {
508
508
overridePolicy = testhelper .NewOverridePolicyByOverrideRules (policyNamespace , policyName , []policyv1alpha1.ResourceSelector {
509
509
{
@@ -544,7 +544,7 @@ var _ = framework.SerialDescribe("failover testing", func() {
544
544
545
545
ginkgo .By ("check whether the failed deployment is rescheduled to other available cluster" , func () {
546
546
gomega .Eventually (func () int {
547
- targetClusterNames := framework .ExtractTargetClustersFrom (controlPlaneClient , deployment )
547
+ targetClusterNames := framework .ExtractTargetClustersFromRB (controlPlaneClient , deployment . Kind , deployment . Namespace , deployment . Name )
548
548
for _ , targetClusterName := range targetClusterNames {
549
549
// the target cluster should be overwritten to another available cluster
550
550
if ! testhelper .IsExclude (targetClusterName , disabledClusters ) {
0 commit comments