From c1f7a9990a821ffa02833cfef83eacb7b7077127 Mon Sep 17 00:00:00 2001 From: cbkjames23 <1411137090@qq.com> Date: Tue, 11 Mar 2025 22:50:57 +0800 Subject: [PATCH 1/2] Add comments to TestGetMasterPodInfo in pkg\ddc\alluxio\utils_test.go. Signed-off-by: cbkjames23 <1411137090@qq.com> --- pkg/ddc/alluxio/utils_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/ddc/alluxio/utils_test.go b/pkg/ddc/alluxio/utils_test.go index 06483082640..275ce50921f 100644 --- a/pkg/ddc/alluxio/utils_test.go +++ b/pkg/ddc/alluxio/utils_test.go @@ -23,7 +23,6 @@ import ( "reflect" "testing" - . "github.com/agiledragon/gomonkey/v2" "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -600,6 +599,11 @@ func TestGetDaemonset(t *testing.T) { } } +// TestGetMasterPodInfo tests the getMasterPodInfo function of the AlluxioEngine struct. +// It defines a set of test cases with expected pod and container names based on the engine's name. +// The function iterates through the test cases, initializes an AlluxioEngine instance, +// and verifies whether the returned pod name and container name match the expected values. + func TestGetMasterPodInfo(t *testing.T) { type fields struct { name string From 96a107f691fb76b7a3b87e70e0d51b9acb49f11a Mon Sep 17 00:00:00 2001 From: cbkjames23 <1411137090@qq.com> Date: Wed, 12 Mar 2025 18:58:40 +0800 Subject: [PATCH 2/2] Add comments to TestGetMasterPodInfo in pkg\ddc\alluxio\utils_test.go. Signed-off-by: cbkjames23 <1411137090@qq.com> --- pkg/ddc/alluxio/utils_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ddc/alluxio/utils_test.go b/pkg/ddc/alluxio/utils_test.go index 275ce50921f..62fd290fffd 100644 --- a/pkg/ddc/alluxio/utils_test.go +++ b/pkg/ddc/alluxio/utils_test.go @@ -23,6 +23,7 @@ import ( "reflect" "testing" + . "github.com/agiledragon/gomonkey/v2" "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -603,7 +604,6 @@ func TestGetDaemonset(t *testing.T) { // It defines a set of test cases with expected pod and container names based on the engine's name. // The function iterates through the test cases, initializes an AlluxioEngine instance, // and verifies whether the returned pod name and container name match the expected values. - func TestGetMasterPodInfo(t *testing.T) { type fields struct { name string