From 0f5de62c0ba1b265b1b17d95226b9bdc4278e76e Mon Sep 17 00:00:00 2001 From: XiaoJuOvo <2803699394@qq.com> Date: Thu, 19 Jun 2025 01:47:07 +0800 Subject: [PATCH 1/3] Add comments/notation to TestTransformResourcesForWorkerNoValue in pkg\ddc\alluxio\transform_resources_test.go. Signed-off-by: XiaoJuOvo <2803699394@qq.com> --- pkg/ddc/alluxio/transform_resources_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/ddc/alluxio/transform_resources_test.go b/pkg/ddc/alluxio/transform_resources_test.go index 81a96014f96..fb5dcc97467 100644 --- a/pkg/ddc/alluxio/transform_resources_test.go +++ b/pkg/ddc/alluxio/transform_resources_test.go @@ -166,7 +166,8 @@ func mockAlluxioRuntimeForMaster(res corev1.ResourceRequirements) *datav1alpha1. return runtime } - +// TestTransformResourcesForWorkerNoValue 测试当资源未设置值时,TransformResourcesForWorker 函数的行为是否符合预期。 +// 该测试主要验证在输入资源缺少 value 字段的情况下,函数能否正确处理并返回预期结果。 func TestTransformResourcesForWorkerNoValue(t *testing.T) { var tests = []struct { runtime *datav1alpha1.AlluxioRuntime From 5c5121f3ecdd277e54302fef93bc0c4d3c10198c Mon Sep 17 00:00:00 2001 From: cheyang Date: Mon, 23 Jun 2025 13:39:52 +0800 Subject: [PATCH 2/3] Fix go fmt issue Signed-off-by: cheyang --- pkg/ddc/alluxio/transform_resources_test.go | 3 ++- pkg/ddc/juicefs/create_volume_test.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/ddc/alluxio/transform_resources_test.go b/pkg/ddc/alluxio/transform_resources_test.go index fb5dcc97467..760d25f4243 100644 --- a/pkg/ddc/alluxio/transform_resources_test.go +++ b/pkg/ddc/alluxio/transform_resources_test.go @@ -166,7 +166,8 @@ func mockAlluxioRuntimeForMaster(res corev1.ResourceRequirements) *datav1alpha1. return runtime } -// TestTransformResourcesForWorkerNoValue 测试当资源未设置值时,TransformResourcesForWorker 函数的行为是否符合预期。 + +// TestTransformResourcesForWorkerNoValue 测试当资源未设置值时,TransformResourcesForWorker 函数的行为是否符合预期。 // 该测试主要验证在输入资源缺少 value 字段的情况下,函数能否正确处理并返回预期结果。 func TestTransformResourcesForWorkerNoValue(t *testing.T) { var tests = []struct { diff --git a/pkg/ddc/juicefs/create_volume_test.go b/pkg/ddc/juicefs/create_volume_test.go index a6b67cbe294..453a30a1383 100644 --- a/pkg/ddc/juicefs/create_volume_test.go +++ b/pkg/ddc/juicefs/create_volume_test.go @@ -44,6 +44,7 @@ import ( // // Parameters: // - t *testing.T: A testing.T object used to manage test state and support test log output. +// // Returns: // - No return value. If the test fails, errors will be reported via t.Errorf. func TestJuiceFSEngine_CreateVolume(t *testing.T) { From 0fa1174fc01c765e70e6b00f4cb6efb36719f22c Mon Sep 17 00:00:00 2001 From: cheyang Date: Mon, 23 Jun 2025 13:43:31 +0800 Subject: [PATCH 3/3] Fix go fmt issue Signed-off-by: cheyang --- pkg/ddc/alluxio/transform_resources_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/ddc/alluxio/transform_resources_test.go b/pkg/ddc/alluxio/transform_resources_test.go index 760d25f4243..dbb4a4f0f11 100644 --- a/pkg/ddc/alluxio/transform_resources_test.go +++ b/pkg/ddc/alluxio/transform_resources_test.go @@ -167,8 +167,11 @@ func mockAlluxioRuntimeForMaster(res corev1.ResourceRequirements) *datav1alpha1. } -// TestTransformResourcesForWorkerNoValue 测试当资源未设置值时,TransformResourcesForWorker 函数的行为是否符合预期。 -// 该测试主要验证在输入资源缺少 value 字段的情况下,函数能否正确处理并返回预期结果。 +// TestTransformResourcesForWorkerNoValue tests whether the TransformResourcesForWorker +// function behaves as expected when resources have no set values. +// +// This test primarily verifies if the function can correctly handle +// and return the expected result when the input resources lack the value field. func TestTransformResourcesForWorkerNoValue(t *testing.T) { var tests = []struct { runtime *datav1alpha1.AlluxioRuntime