This is an automated email from the ASF dual-hosted git repository.

roryqi pushed a commit to branch support-annotations
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git

commit 488b8d2a6fb1860abbff4e1ec7e4df0c48573740
Author: Rory <ror...@apache.org>
AuthorDate: Fri Jun 21 16:15:32 2024 +0800

    fix ut
---
 .../operator/pkg/controller/sync/coordinator/coordinator_test.go        | 2 --
 .../operator/pkg/controller/sync/shuffleserver/shuffleserver_test.go    | 2 --
 2 files changed, 4 deletions(-)

diff --git 
a/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator_test.go
 
b/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator_test.go
index b9759c86f..ebd95b948 100644
--- 
a/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator_test.go
+++ 
b/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator_test.go
@@ -449,7 +449,6 @@ func TestGenerateDeploy(t *testing.T) {
                        rss:  withCustomAffinity(testAffinity),
                        IsValidDeploy: func(deploy *appsv1.Deployment, rss 
*uniffleapi.RemoteShuffleService) (bool, error) {
                                if deploy.Spec.Template.Spec.Affinity != nil {
-                                       deploy.Spec.Template.Spec.Affinity = 
rss.Spec.Coordinator.Affinity
                                        equal := 
reflect.DeepEqual(deploy.Spec.Template.Spec.Affinity, testAffinity)
                                        if equal {
                                                return true, nil
@@ -463,7 +462,6 @@ func TestGenerateDeploy(t *testing.T) {
                        rss:  withCustomImagePullSecrets(testImagePullSecrets),
                        IsValidDeploy: func(deploy *appsv1.Deployment, rss 
*uniffleapi.RemoteShuffleService) (bool, error) {
                                if deploy.Spec.Template.Spec.ImagePullSecrets 
!= nil {
-                                       
deploy.Spec.Template.Spec.ImagePullSecrets = rss.Spec.ImagePullSecrets
                                        equal := 
reflect.DeepEqual(deploy.Spec.Template.Spec.ImagePullSecrets, 
testImagePullSecrets)
                                        if equal {
                                                return true, nil
diff --git 
a/deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver_test.go
 
b/deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver_test.go
index 8fb5f6afd..ba4cfb3c0 100644
--- 
a/deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver_test.go
+++ 
b/deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver_test.go
@@ -508,7 +508,6 @@ func TestGenerateSts(t *testing.T) {
                        rss:  withCustomAffinity(testAffinity),
                        IsValidSts: func(sts *appsv1.StatefulSet, rss 
*uniffleapi.RemoteShuffleService) (valid bool, err error) {
                                if sts.Spec.Template.Spec.Affinity != nil {
-                                       sts.Spec.Template.Spec.Affinity = 
rss.Spec.ShuffleServer.Affinity
                                        equal := 
reflect.DeepEqual(sts.Spec.Template.Spec.Affinity, testAffinity)
                                        if equal {
                                                return true, nil
@@ -522,7 +521,6 @@ func TestGenerateSts(t *testing.T) {
                        rss:  withCustomImagePullSecrets(testImagePullSecrets),
                        IsValidSts: func(deploy *appsv1.StatefulSet, rss 
*uniffleapi.RemoteShuffleService) (bool, error) {
                                if deploy.Spec.Template.Spec.ImagePullSecrets 
!= nil {
-                                       
deploy.Spec.Template.Spec.ImagePullSecrets = rss.Spec.ImagePullSecrets
                                        equal := 
reflect.DeepEqual(deploy.Spec.Template.Spec.ImagePullSecrets, 
testImagePullSecrets)
                                        if equal {
                                                return true, nil

Reply via email to