From 8ccae5b06375c9816fca2673fd95653da29f0ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=AF=93?= Date: Tue, 30 Jan 2024 16:05:15 +0800 Subject: [PATCH] feat: reatin dns config when sync pod to member cluster --- pkg/controllers/sync/dispatch/retain_test.go | 24 +++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pkg/controllers/sync/dispatch/retain_test.go b/pkg/controllers/sync/dispatch/retain_test.go index 0ab17733..fde3fb77 100644 --- a/pkg/controllers/sync/dispatch/retain_test.go +++ b/pkg/controllers/sync/dispatch/retain_test.go @@ -221,8 +221,10 @@ func Test_retainContainer(t *testing.T) { desiredContainer: map[string]interface{}{ "name": "container-1", "resources": map[string]interface{}{ - "cpu": "500m", - "memory": "512Mi", + "requests": map[string]interface{}{ + "cpu": "500m", + "memory": "512Mi", + }, }, }, clusterContainer: map[string]interface{}{ @@ -236,8 +238,10 @@ func Test_retainContainer(t *testing.T) { desiredContainer: map[string]interface{}{ "name": "container-1", "resources": map[string]interface{}{ - "cpu": "500m", - "memory": "512Mi", + "requests": map[string]interface{}{ + "cpu": "500m", + "memory": "512Mi", + }, }, }, clusterContainer: map[string]interface{}{ @@ -252,15 +256,19 @@ func Test_retainContainer(t *testing.T) { desiredContainer: map[string]interface{}{ "name": "container-1", "resources": map[string]interface{}{ - "cpu": "500m", - "memory": "512Mi", + "requests": map[string]interface{}{ + "cpu": "500m", + "memory": "512Mi", + }, }, }, clusterContainer: map[string]interface{}{ "name": "container-1", "resources": map[string]interface{}{ - "cpu": "100m", - "memory": "100Mi", + "requests": map[string]interface{}{ + "cpu": "100m", + "memory": "100Mi", + }, }, }, },